Added __hash__ for MockMethod - no default hash in py3k

This commit is contained in:
Przemyslaw Gajda 2012-04-23 23:28:34 +02:00
parent 7960a29252
commit ec173d58f0
1 changed files with 3 additions and 0 deletions

3
mox.py
View File

@ -1117,6 +1117,9 @@ class MockMethod(object):
if self._description:
full_desc = "%s.%s" % (self._description, full_desc)
return full_desc
def __hash__(self):
return id(self)
def __eq__(self, rhs):
"""Test whether this MockMethod is equivalent to another MockMethod.