summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-11-07 14:54:48 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-11-07 14:54:48 (GMT)
commit411dfd871c25355def5599319a45c906f9121282 (patch)
tree7ecf9c2188ff72fee40a62f79d4861395ee0e64d /Lib/test
parent608c2135302386d006291438b388c99b957291eb (diff)
downloadcpython-411dfd871c25355def5599319a45c906f9121282.zip
cpython-411dfd871c25355def5599319a45c906f9121282.tar.gz
cpython-411dfd871c25355def5599319a45c906f9121282.tar.bz2
Issue #22643: Skip test_case_operation_overflow on computers with low memory.
Diffstat (limited to 'Lib/test')
-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 2cc1d7c..d664465 100644
--- a/Lib/test/test_unicode.py
+++ b/Lib/test/test_unicode.py
@@ -820,7 +820,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