Merge pull request #1042 from Bjwebb/issue411
Add __eq__ method to assertion comparison example
This commit is contained in:
commit
7c3be72ac7
|
@ -202,6 +202,9 @@ now, given this test module::
|
|||
def __init__(self, val):
|
||||
self.val = val
|
||||
|
||||
def __eq__(self, other):
|
||||
return self.val == other.val
|
||||
|
||||
def test_compare():
|
||||
f1 = Foo(1)
|
||||
f2 = Foo(2)
|
||||
|
|
Loading…
Reference in New Issue