summaryrefslogtreecommitdiffstats
path: root/Lib/test/string_tests.py
diff options
context:
space:
mode:
authorZachary Ware <zachary.ware@gmail.com>2013-12-08 06:20:35 (GMT)
committerZachary Ware <zachary.ware@gmail.com>2013-12-08 06:20:35 (GMT)
commit9fe6d86709b0e769602ff55a6e5a202c440b9d8a (patch)
treeec3d7b1b0cbbd15658459e397c6905964c192331 /Lib/test/string_tests.py
parent774f909489ca1395ba1e3f3a1f3d43495df6cdfe (diff)
downloadcpython-9fe6d86709b0e769602ff55a6e5a202c440b9d8a.zip
cpython-9fe6d86709b0e769602ff55a6e5a202c440b9d8a.tar.gz
cpython-9fe6d86709b0e769602ff55a6e5a202c440b9d8a.tar.bz2
Issue 19572: More silently skipped tests explicitly skipped.
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 1d70385..1b5db94 100644
--- a/Lib/test/string_tests.py
+++ b/Lib/test/string_tests.py
@@ -663,10 +663,10 @@ class BaseTest:
self.checkraises(TypeError, 'hello', 'replace', 42, 'h')
self.checkraises(TypeError, 'hello', 'replace', 'h', 42)
+ @unittest.skipIf(sys.maxsize > (1 << 32) or struct.calcsize('P') != 4,
+ 'only applies to 32-bit platforms')
def test_replace_overflow(self):
# Check for overflow checking on 32 bit machines
- if sys.maxsize != 2147483647 or struct.calcsize("P") > 4:
- return
A2_16 = "A" * (2**16)
self.checkraises(OverflowError, A2_16, "replace", "", A2_16)
self.checkraises(OverflowError, A2_16, "replace", "A", A2_16)