Skip to content

Commit fb48d32

Browse files
committed
Add tests for dict.__ne__ and dict.__eq__
1 parent 9b364b3 commit fb48d32

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

py/tests/dict.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,15 @@
3333
assert a.__contains__('hello')
3434
assert not a.__contains__('world')
3535

36+
doc="__eq__, __ne__"
37+
a = {'a': 'b'}
38+
assert a.__eq__(3) != True
39+
assert a.__ne__(3) != False
40+
assert a.__ne__(3) != True
41+
assert a.__ne__(3) != False
42+
43+
assert a.__ne__({}) == True
44+
assert a.__eq__({'a': 'b'}) == True
45+
assert a.__ne__({'a': 'b'}) == False
46+
3647
doc="finished"

0 commit comments

Comments
 (0)