mirror of
https://github.com/python/cpython.git
synced 2025-11-28 22:18:54 +00:00
merge 3.3
This commit is contained in:
commit
b0ef78535a
1 changed files with 2 additions and 1 deletions
|
|
@ -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)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue