diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-11-07 16:55:39 +0200 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-11-07 16:55:39 +0200 |
commit | 96b6ff20d3811457fc6e063bce331e00625d03be (patch) | |
tree | 70ab5f532cd05cd4f5fdf28fae06dcb2424f1975 | |
parent | fad85aadb0e168b7bde414694e448f34bb38c8ef (diff) | |
parent | 3d717d05de08703abbc4d29220d3e22a6a93de43 (diff) | |
download | cpython-git-96b6ff20d3811457fc6e063bce331e00625d03be.tar.gz |
Issue #22643: Skip test_case_operation_overflow on computers with low memory.
-rw-r--r-- | 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 index 1429a6d545..56a60df007 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 |