mirror of
https://github.com/python/cpython.git
synced 2025-10-02 13:22:19 +00:00
Issue #22643: Skip test_case_operation_overflow on computers with low memory.
This commit is contained in:
commit
96b6ff20d3
1 changed files with 9 additions and 1 deletions
|
@ -849,7 +849,15 @@ class UnicodeTest(string_tests.CommonTest,
|
||||||
@support.cpython_only
|
@support.cpython_only
|
||||||
def test_case_operation_overflow(self):
|
def test_case_operation_overflow(self):
|
||||||
# Issue #22643
|
# 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):
|
def test_contains(self):
|
||||||
# Testing Unicode contains method
|
# Testing Unicode contains method
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue