Skip to content

Commit 1572944

Browse files
committed
reduce memory usage of test (closes python#23369)
1 parent 0eaabf1 commit 1572944

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Lib/test/test_json/test_encode_basestring_ascii.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ class TestPyEncodeBasestringAscii(TestEncodeBasestringAscii, PyTest): pass
4545
class TestCEncodeBasestringAscii(TestEncodeBasestringAscii, CTest):
4646
@bigaddrspacetest
4747
def test_overflow(self):
48-
s = "\uffff"*((2**32)//6 + 1)
48+
size = (2**32)//6 + 1
49+
s = "\x00"*size
4950
with self.assertRaises(OverflowError):
5051
self.json.encoder.encode_basestring_ascii(s)

0 commit comments

Comments
 (0)