We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e2e4899 commit a9389cdCopy full SHA for a9389cd
symengine/tests/test_expr.py
@@ -1,4 +1,4 @@
1
-from symengine import Symbol, Integer, oo
+from symengine import Symbol, Integer, oo, sin
2
from symengine.test_utilities import raises
3
4
@@ -31,13 +31,12 @@ def test_as_powers_dict():
31
def test_Basic__has():
32
x = Symbol('x')
33
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
-
+ xpowy = x**y
+ e = sin(xpowy)
+ assert e.has(x)
+ assert e.has(y)
+ assert e.has(xpowy)
+ raises(Exception, lambda: e.has(x+1)) # subtree matching of associative operators not yet supported
41
assert (x + oo).has(oo)
42
assert (x - oo).has(-oo)
43
assert not (x + oo).has(-oo)
0 commit comments