Commit 2a864a10 authored by Benjamin Peterson's avatar Benjamin Peterson

reduce memory usage of test (closes #23369)

parent 61c2e4a0
......@@ -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)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment