summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_format.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_format.py')
-rw-r--r--Lib/test/test_format.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/Lib/test/test_format.py b/Lib/test/test_format.py
index 8bf5d6e..61e44f9 100644
--- a/Lib/test/test_format.py
+++ b/Lib/test/test_format.py
@@ -1,5 +1,7 @@
from test.test_support import verbose, have_unicode, TestFailed
import sys
+from test.test_support import MAX_Py_ssize_t
+maxsize = MAX_Py_ssize_t
# test string formatting operator (I am not sure if this is being tested
# elsewhere but, surely, some of the given cases are *not* tested because
@@ -238,11 +240,11 @@ class Foobar(long):
test_exc('%o', Foobar(), TypeError,
"expected string or Unicode object, long found")
-if sys.maxint == 2**31-1:
+if maxsize == 2**31-1:
# crashes 2.2.1 and earlier:
try:
- "%*d"%(sys.maxint, -127)
+ "%*d"%(maxsize, -127)
except MemoryError:
pass
else:
- raise TestFailed, '"%*d"%(sys.maxint, -127) should fail'
+ raise TestFailed, '"%*d"%(maxsize, -127) should fail'