There was an error while loading. Please reload this page.
1 parent 4f0775a commit f7f0293Copy full SHA for f7f0293
1 file changed
symengine/tests/test_pickling.py
@@ -31,11 +31,17 @@ def __reduce__(self):
31
def test_pysymbol():
32
a = MySymbol("hello", attr=1)
33
b = pickle.loads(pickle.dumps(a + 2)) - 2
34
+ c = MySymbol("hello", attr=-1)
35
try:
36
assert a == b
37
+ assert type(a) == type(b)
38
+ assert a.attr == 1
39
+ assert b.attr == 1
40
+ assert b != c
41
finally:
42
a._unsafe_reset()
43
b._unsafe_reset()
44
+ c._unsafe_reset()
45
46
a = MySymbolBase("hello", attr=1)
47
0 commit comments