[Python-checkins] cpython (merge 3.5 -> default): Issue #22643: Skip test_case_operation_overflow on computers with low memory.
serhiy.storchaka
python-checkins at python.org
Sat Nov 7 09:56:00 EST 2015
https://hg.python.org/cpython/rev/b1c5949a3af4
changeset: 99003:b1c5949a3af4
parent: 99000:45a404d33c2d
parent: 99002:6b00bee218ff
user: Serhiy Storchaka <storchaka at gmail.com>
date: Sat Nov 07 16:55:39 2015 +0200
summary:
Issue #22643: Skip test_case_operation_overflow on computers with low memory.
files:
Lib/test/test_unicode.py | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py
--- a/Lib/test/test_unicode.py
+++ b/Lib/test/test_unicode.py
@@ -849,7 +849,15 @@
@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
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list