Commit b0ef7853 authored by Benjamin Peterson's avatar Benjamin Peterson

merge 3.3

parents f5f9c135 15729444
...@@ -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