[pypy-svn] r66110 - pypy/trunk/pypy/module/__builtin__/test
antocuni at codespeak.net
antocuni at codespeak.net
Sat Jul 4 12:59:43 CEST 2009
Author: antocuni
Date: Sat Jul 4 12:59:43 2009
New Revision: 66110
Modified:
pypy/trunk/pypy/module/__builtin__/test/test_classobj.py
Log:
(bbrazil, antocuni around)
fix this for 64 bit machines
Modified: pypy/trunk/pypy/module/__builtin__/test/test_classobj.py
==============================================================================
--- pypy/trunk/pypy/module/__builtin__/test/test_classobj.py (original)
+++ pypy/trunk/pypy/module/__builtin__/test/test_classobj.py Sat Jul 4 12:59:43 2009
@@ -505,6 +505,7 @@
raises(TypeError, cmp, a, b)
def test_hash(self):
+ import sys
class A:
pass
hash(A()) # does not crash
@@ -528,11 +529,12 @@
return 1
a = A()
raises(TypeError, hash, a)
+ bigint = sys.maxint + 1
class A: # can return long
def __hash__(self):
- return long(2**31)
+ return long(bigint)
a = A()
- assert hash(a) == -2147483648
+ assert hash(a) == -bigint
def test_index(self):
import sys
More information about the Pypy-commit
mailing list