summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_unicode.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-11-07 14:55:16 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-11-07 14:55:16 (GMT)
commit3d717d05de08703abbc4d29220d3e22a6a93de43 (patch)
treed4c497fd4ad43565d466379e83d07f5e16063a8a /Lib/test/test_unicode.py
parent838b7cc0e75eb6112ed2f945845dd6d27b33b85f (diff)
parent411dfd871c25355def5599319a45c906f9121282 (diff)
downloadcpython-3d717d05de08703abbc4d29220d3e22a6a93de43.zip
cpython-3d717d05de08703abbc4d29220d3e22a6a93de43.tar.gz
cpython-3d717d05de08703abbc4d29220d3e22a6a93de43.tar.bz2
Issue #22643: Skip test_case_operation_overflow on computers with low memory.
Diffstat (limited to 'Lib/test/test_unicode.py')
-rw-r--r--Lib/test/test_unicode.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py
index 1429a6d..56a60df 100644
--- a/Lib/test/test_unicode.py
+++ b/Lib/test/test_unicode.py
@@ -849,7 +849,15 @@ class UnicodeTest(string_tests.CommonTest,
@support.cpython_only
def test_case_operation_overflow(self):
# Issue #22643
- self.assertRaises(OverflowError, ("ü"*(2**32//12 + 1)).upper)
+ size = 2**32//12 + 1
+ try:
+ s = "ü" * size
+ except MemoryError:
+ self.skipTest('no enough memory (%.0f MiB required)' % (size / 2**20))
+ try:
+ self.assertRaises(OverflowError, s.upper)
+ finally:
+ del s
def test_contains(self):
# Testing Unicode contains method