summaryrefslogtreecommitdiff
path: root/Lib/test/string_tests.py
diff options
context:
space:
mode:
authorKristján Valur Jónsson <kristjan@ccpgames.com>2007-05-07 13:33:39 +0000
committerKristján Valur Jónsson <kristjan@ccpgames.com>2007-05-07 13:33:39 +0000
commit7bca027f64945b2ea2e3f3d4e6d1fb2f2a9ea76c (patch)
treeb7c89f574e4cbdb10a2768f224c473ab5d1d44a7 /Lib/test/string_tests.py
parent4e6b5e9eade84f25e6d4d7c609e4931a73a9db97 (diff)
downloadcpython-git-7bca027f64945b2ea2e3f3d4e6d1fb2f2a9ea76c.tar.gz
Merging change 55102 from the trunk:
Fix those parts in the testsuite that assumed that sys.maxint would cause overflow on x64. Now the testsuite is well behaved on that platform.
Diffstat (limited to 'Lib/test/string_tests.py')
-rw-r--r--Lib/test/string_tests.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/string_tests.py b/Lib/test/string_tests.py
index 1aa68dedd0..b257d57b0e 100644
--- a/Lib/test/string_tests.py
+++ b/Lib/test/string_tests.py
@@ -2,7 +2,7 @@
Common tests shared by test_str, test_unicode, test_userstring and test_string.
"""
-import unittest, string, sys
+import unittest, string, sys, struct
from test import test_support
from UserList import UserList
@@ -671,7 +671,7 @@ class CommonTest(unittest.TestCase):
def test_replace_overflow(self):
# Check for overflow checking on 32 bit machines
- if sys.maxint != 2147483647:
+ if sys.maxint != 2147483647 or struct.calcsize("P") > 4:
return
A2_16 = "A" * (2**16)
self.checkraises(OverflowError, A2_16, "replace", "", A2_16)