mirror of https://github.com/python/cpython
reduce memory usage of test (closes #23369)
This commit is contained in:
parent
0eaabf1c05
commit
1572944499
|
@ -45,6 +45,7 @@ class TestPyEncodeBasestringAscii(TestEncodeBasestringAscii, PyTest): pass
|
|||
class TestCEncodeBasestringAscii(TestEncodeBasestringAscii, CTest):
|
||||
@bigaddrspacetest
|
||||
def test_overflow(self):
|
||||
s = "\uffff"*((2**32)//6 + 1)
|
||||
size = (2**32)//6 + 1
|
||||
s = "\x00"*size
|
||||
with self.assertRaises(OverflowError):
|
||||
self.json.encoder.encode_basestring_ascii(s)
|
||||
|
|
Loading…
Reference in New Issue