Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0b2a6dc

Browse files
committed
merge 3.4
2 parents bcf527e + b0ef785 commit 0b2a6dc

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

0 commit comments

Comments
 (0)