[pypy-svn] r66852 - pypy/trunk/pypy/interpreter/test
benjamin at codespeak.net
benjamin at codespeak.net
Sat Aug 15 21:45:39 CEST 2009
Author: benjamin
Date: Sat Aug 15 21:45:38 2009
New Revision: 66852
Modified:
pypy/trunk/pypy/interpreter/test/test_objspace.py
Log:
fix these tests on 64bit platforms
Modified: pypy/trunk/pypy/interpreter/test/test_objspace.py
==============================================================================
--- pypy/trunk/pypy/interpreter/test/test_objspace.py (original)
+++ pypy/trunk/pypy/interpreter/test/test_objspace.py Sat Aug 15 21:45:38 2009
@@ -8,6 +8,10 @@
# this test isn't so much to test that the objspace interface *works*
# -- it's more to test that it's *there*
+
+INT32_MAX = 2147483648
+
+
class TestObjSpace:
def test_newlist(self):
w = self.space.wrap
@@ -154,9 +158,9 @@
res = space.r_longlong_w(w_value)
assert res == 12
assert type(res) is r_longlong
- w_value = space.wrap(r_longlong(-sys.maxint * 42))
+ w_value = space.wrap(r_longlong(-INT32_MAX * 42))
res = space.r_longlong_w(w_value)
- assert res == -sys.maxint * 42
+ assert res == -INT32_MAX * 42
assert type(res) is r_longlong
w_obj = space.wrap("hello world")
space.raises_w(space.w_TypeError, space.r_longlong_w, w_obj)
@@ -169,9 +173,9 @@
res = space.r_ulonglong_w(w_value)
assert res == 12
assert type(res) is r_ulonglong
- w_value = space.wrap(r_ulonglong(sys.maxint * 42))
+ w_value = space.wrap(r_ulonglong(INT32_MAX * 42))
res = space.r_ulonglong_w(w_value)
- assert res == sys.maxint * 42
+ assert res == INT32_MAX * 42
assert type(res) is r_ulonglong
w_obj = space.wrap("hello world")
space.raises_w(space.w_TypeError, space.r_ulonglong_w, w_obj)
More information about the Pypy-commit
mailing list