Skip to content

Commit a9389cd

Browse files
committed
update tests of HasBasicVisitor
1 parent e2e4899 commit a9389cd

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

symengine/tests/test_expr.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from symengine import Symbol, Integer, oo
1+
from symengine import Symbol, Integer, oo, sin
22
from symengine.test_utilities import raises
33

44

@@ -31,13 +31,12 @@ def test_as_powers_dict():
3131
def test_Basic__has():
3232
x = Symbol('x')
3333
y = Symbol('y')
34-
xp3 = (x+3)
35-
ym4 = (y-4)
36-
e = xp3**ym4
37-
assert e.has(xp3)
38-
assert e.has(ym4)
39-
assert not e.has(y-5)
40-
34+
xpowy = x**y
35+
e = sin(xpowy)
36+
assert e.has(x)
37+
assert e.has(y)
38+
assert e.has(xpowy)
39+
raises(Exception, lambda: e.has(x+1)) # subtree matching of associative operators not yet supported
4140
assert (x + oo).has(oo)
4241
assert (x - oo).has(-oo)
4342
assert not (x + oo).has(-oo)

0 commit comments

Comments
 (0)