summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrzemyslaw Gajda <quermit@gmail.com>2012-04-23 23:28:34 +0200
committerPrzemyslaw Gajda <quermit@gmail.com>2012-04-23 23:28:34 +0200
commitec173d58f0e4e02e981a63a125666b8bda27a1c9 (patch)
tree66256b3d6f6e2158e42a96fd54fd1a54d54ffda8
parent7960a292522ab78aad8cdccb01b46fc8e611685a (diff)
downloadpymox-ec173d58f0e4e02e981a63a125666b8bda27a1c9.tar.gz
Added __hash__ for MockMethod - no default hash in py3k
-rwxr-xr-xmox.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/mox.py b/mox.py
index 0a15047..cc2bae1 100755
--- a/mox.py
+++ b/mox.py
@@ -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.