summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_unicode.py
diff options
context:
space:
mode:
authorMartin Panter <vadmium+py@gmail.com>2017-01-14 06:26:51 (GMT)
committerMartin Panter <vadmium+py@gmail.com>2017-01-14 06:26:51 (GMT)
commit758c7d044bb98da9e98654fa91961f54a915712d (patch)
tree02164ee4c30fa35d3248ff26bb9c7758167f1a5c /Lib/test/test_unicode.py
parent6b642c9a7165db52a7c7b41de9e80aa8f59eea3e (diff)
parentb71c0956d0904cfdc271cd10d40385c730cf8bcb (diff)
downloadcpython-758c7d044bb98da9e98654fa91961f54a915712d.zip
cpython-758c7d044bb98da9e98654fa91961f54a915712d.tar.gz
cpython-758c7d044bb98da9e98654fa91961f54a915712d.tar.bz2
Merge tests from 3.5
Diffstat (limited to 'Lib/test/test_unicode.py')
-rw-r--r--Lib/test/test_unicode.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py
index 883c362..86ebd45 100644
--- a/Lib/test/test_unicode.py
+++ b/Lib/test/test_unicode.py
@@ -465,6 +465,13 @@ class UnicodeTest(string_tests.CommonTest,
self.checkraises(TypeError, ' ', 'join', [1, 2, 3])
self.checkraises(TypeError, ' ', 'join', ['1', '2', 3])
+ @unittest.skipIf(sys.maxsize > 2**32,
+ 'needs too much memory on a 64-bit platform')
+ def test_join_overflow(self):
+ size = int(sys.maxsize**0.5) + 1
+ seq = ('A' * size,) * size
+ self.assertRaises(OverflowError, ''.join, seq)
+
def test_replace(self):
string_tests.CommonTest.test_replace(self)