diff options
author | Benjamin Peterson <benjamin@python.org> | 2015-02-02 22:47:26 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2015-02-02 22:47:26 (GMT) |
commit | b0ef78535a94b6b368a8b9935525cb3162c670d4 (patch) | |
tree | 383fcb1db01a62c6472eda7629cd0a216d7332d9 | |
parent | f5f9c13551ca6c4594e69981e162198ae73f3a1d (diff) | |
parent | 1572944499aa7d399460076bc7872ba9d5324932 (diff) | |
download | cpython-b0ef78535a94b6b368a8b9935525cb3162c670d4.zip cpython-b0ef78535a94b6b368a8b9935525cb3162c670d4.tar.gz cpython-b0ef78535a94b6b368a8b9935525cb3162c670d4.tar.bz2 |
merge 3.3
-rw-r--r-- | Lib/test/test_json/test_encode_basestring_ascii.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_json/test_encode_basestring_ascii.py b/Lib/test/test_json/test_encode_basestring_ascii.py index a2bbc7d..2122da1 100644 --- a/Lib/test/test_json/test_encode_basestring_ascii.py +++ b/Lib/test/test_json/test_encode_basestring_ascii.py @@ -45,6 +45,7 @@ class TestPyEncodeBasestringAscii(TestEncodeBasestringAscii, PyTest): pass class TestCEncodeBasestringAscii(TestEncodeBasestringAscii, CTest): @bigaddrspacetest def test_overflow(self): - s = "\uffff"*((2**32)//6 + 1) + size = (2**32)//6 + 1 + s = "\x00"*size with self.assertRaises(OverflowError): self.json.encoder.encode_basestring_ascii(s) |