Merge pull request #1042 from Bjwebb/issue411

Add __eq__ method to assertion comparison example
This commit is contained in:
Floris Bruynooghe 2015-09-21 14:57:59 +01:00
commit 7c3be72ac7
1 changed files with 4 additions and 1 deletions

View File

@ -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)