summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorTrent Mick <trentm@activestate.com>2000-10-04 17:50:59 (GMT)
committerTrent Mick <trentm@activestate.com>2000-10-04 17:50:59 (GMT)
commitd68d0a6f5a0a4af255d6a73e236166d42f8b76b6 (patch)
tree5ecae6313bf927e8e7749b751d1854de246acbb7 /Lib/test
parentb2c2c9e9776e69d4d7860f89ef385885a6938ea5 (diff)
downloadcpython-d68d0a6f5a0a4af255d6a73e236166d42f8b76b6.zip
cpython-d68d0a6f5a0a4af255d6a73e236166d42f8b76b6.tar.gz
cpython-d68d0a6f5a0a4af255d6a73e236166d42f8b76b6.tar.bz2
Fix for test_class.py on Win64. id(self), which on Win64 returns a
PyLong, was used for the return value of a class __hash__ method, which *must* return a PyInt. Solution: hash() the id(self) value.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_class.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_class.py b/Lib/test/test_class.py
index 1fc9971..43c1d3b 100644
--- a/Lib/test/test_class.py
+++ b/Lib/test/test_class.py
@@ -71,7 +71,7 @@ class AllTests:
def __hash__(self, *args):
print "__hash__:", args
- return id(self)
+ return hash(id(self))
def __str__(self, *args):
print "__str__:", args