summaryrefslogtreecommitdiffstats
path: root/Lib/test/string_tests.py
diff options
context:
space:
mode:
authorZachary Ware <zachary.ware@gmail.com>2013-12-08 06:44:27 (GMT)
committerZachary Ware <zachary.ware@gmail.com>2013-12-08 06:44:27 (GMT)
commit101d9e7250c039aeabea1582459d40b52cc81024 (patch)
treee0a6990c763c2435fae0a08a4114ac17569aa261 /Lib/test/string_tests.py
parent5ca129b8f016668bf914592e58082c452a7ad9b4 (diff)
parent7ef00ff91a0a90a2b11df40d110365e6a7909a94 (diff)
downloadcpython-101d9e7250c039aeabea1582459d40b52cc81024.zip
cpython-101d9e7250c039aeabea1582459d40b52cc81024.tar.gz
cpython-101d9e7250c039aeabea1582459d40b52cc81024.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 30784d4..ef995e2 100644
--- a/Lib/test/string_tests.py
+++ b/Lib/test/string_tests.py
@@ -676,10 +676,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)