mirror of https://github.com/python/cpython
merge 3.4
This commit is contained in:
commit
0b2a6dc42b
|
@ -42,6 +42,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)
|
||||||
|
|
Loading…
Reference in New Issue