Skip to content

Commit 66a63b9

Browse files
committed
pickling test correctness
1 parent f7f0293 commit 66a63b9

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

symengine/tests/test_pickling.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,15 @@ def __eq__(self, other):
2222
return False
2323
return self.name == other.name and self.attr == other.attr
2424

25+
def __ne__(self, other):
26+
return not (self == other)
27+
28+
def __hash__(self, other):
29+
return hash((self.__class__.__name__, self.name, self.attr))
30+
2531

2632
class MySymbol(MySymbolBase):
33+
2734
def __reduce__(self):
2835
return (self.__class__, (self.name, self.attr))
2936

0 commit comments

Comments
 (0)