Commit 15729444 authored by Benjamin Peterson's avatar Benjamin Peterson

reduce memory usage of test (closes #23369)

parent 0eaabf1c
...@@ -45,6 +45,7 @@ class TestPyEncodeBasestringAscii(TestEncodeBasestringAscii, PyTest): pass ...@@ -45,6 +45,7 @@ class TestPyEncodeBasestringAscii(TestEncodeBasestringAscii, PyTest): pass
class TestCEncodeBasestringAscii(TestEncodeBasestringAscii, CTest): class TestCEncodeBasestringAscii(TestEncodeBasestringAscii, CTest):
@bigaddrspacetest @bigaddrspacetest
def test_overflow(self): def test_overflow(self):
s = "\uffff"*((2**32)//6 + 1) size = (2**32)//6 + 1
s = "\x00"*size
with self.assertRaises(OverflowError): with self.assertRaises(OverflowError):
self.json.encoder.encode_basestring_ascii(s) 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