[pypy-svn] r75118 - pypy/trunk/pypy/module/cpyext/test

afa at codespeak.net afa at codespeak.net
Fri Jun 4 20:50:03 CEST 2010


Author: afa
Date: Fri Jun  4 20:50:01 2010
New Revision: 75118

Modified:
   pypy/trunk/pypy/module/cpyext/test/test_longobject.py
Log:
Fix test on 64bit platforms


Modified: pypy/trunk/pypy/module/cpyext/test/test_longobject.py
==============================================================================
--- pypy/trunk/pypy/module/cpyext/test/test_longobject.py	(original)
+++ pypy/trunk/pypy/module/cpyext/test/test_longobject.py	Fri Jun  4 20:50:01 2010
@@ -76,7 +76,11 @@
              """
                  return PyLong_FromUnsignedLong((unsigned long)-1);
              """)])
-        assert module.from_unsignedlong() == (1<<32) - 1
+        import sys
+        if sys.maxint < 1<<32:
+            assert module.from_unsignedlong() == (1<<32) - 1
+        else:
+            assert module.from_unsignedlong() == (1<<64) - 1
 
     def test_fromlonglong(self):
         module = self.import_extension('foo', [



More information about the Pypy-commit mailing list