Skip to content

Commit 3688217

Browse files
committed
Add test for invalid unary arcsin operation
Expand test_unary in tests/test_expr.py to assert that calling np.arcsin on the symbolic x raises a TypeError. This adds coverage for invalid unary operations to ensure the code properly reports type errors for unsupported operand types.
1 parent b4d45b1 commit 3688217

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

tests/test_expr.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,10 @@ def test_unary(model):
260260
assert cos(1) == np.cos(1)
261261
assert all(cos([1, 1]) == np.cos([1, 1]))
262262

263+
# test invalid unary operations
264+
with pytest.raises(TypeError):
265+
np.arcsin(x)
266+
263267

264268
def test_mul():
265269
m = Model()

0 commit comments

Comments
 (0)