summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_strop.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_strop.py')
-rw-r--r--Lib/test/test_strop.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_strop.py b/Lib/test/test_strop.py
index 8ce29ef..45c90a6 100644
--- a/Lib/test/test_strop.py
+++ b/Lib/test/test_strop.py
@@ -4,6 +4,7 @@ warnings.filterwarnings("ignore", "strop functions are obsolete;",
r'test.test_strop|unittest')
import strop
import unittest
+import sys
from test import test_support
@@ -115,6 +116,11 @@ class StropFunctionTestCase(unittest.TestCase):
strop.uppercase
strop.whitespace
+ @unittest.skipUnless(sys.maxsize == 2147483647, "only for 32-bit")
+ def test_expandtabs_overflow(self):
+ s = '\t\n' * 0x10000 + 'A' * 0x1000000
+ self.assertRaises(OverflowError, strop.expandtabs, s, 0x10001)
+
@test_support.precisionbigmemtest(size=test_support._2G - 1, memuse=5)
def test_stropjoin_huge_list(self, size):
a = "A" * size