Author: Antonio Cuni <[email protected]>
Branch: py3k
Changeset: r52886:cd36cd993475
Date: 2012-02-24 20:10 +0100
http://bitbucket.org/pypy/pypy/changeset/cd36cd993475/

Log:    we no longer have longs; tweak the test to check that range() works
        well with large integers

diff --git a/pypy/module/__builtin__/test/test_functional.py 
b/pypy/module/__builtin__/test/test_functional.py
--- a/pypy/module/__builtin__/test/test_functional.py
+++ b/pypy/module/__builtin__/test/test_functional.py
@@ -147,10 +147,10 @@
 
    def test_range_long(self):
        import sys
-       a = long(10 * sys.maxint)
-       raises(OverflowError, range, a)
-       raises(OverflowError, range, 0, a)
-       raises(OverflowError, range, 0, 1, a)
+       a = 10 * sys.maxsize
+       assert range(a)[-1] == a-1
+       assert range(0, a)[-1] == a-1
+       assert range(0, 1, a)[-1] == 0
 
    def test_range_reduce(self):
       x = range(2, 9, 3)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to