Skip to content

Commit 551c16e

Browse files
committed
more explicit testing of pickling of user defined symbol
1 parent 4f0775a commit 551c16e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

symengine/tests/test_pickling.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ def test_pysymbol():
3333
b = pickle.loads(pickle.dumps(a + 2)) - 2
3434
try:
3535
assert a == b
36+
assert type(a) == type(b)
37+
assert a.attr == 1
38+
assert b.attr == 1
39+
assert b != MySymbol("hello", attr=-1)
3640
finally:
3741
a._unsafe_reset()
3842
b._unsafe_reset()

0 commit comments

Comments
 (0)