summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2015-02-02 22:47:31 (GMT)
committerBenjamin Peterson <benjamin@python.org>2015-02-02 22:47:31 (GMT)
commit0b2a6dc42b9bf02408764133a8dfcd843bbd0e66 (patch)
tree955e6e2ef23cfd0f79900e8fb1b6a81c08a1f61c
parentbcf527e0d661ab5eadd59b9c4b27e5a7feee9eb6 (diff)
parentb0ef78535a94b6b368a8b9935525cb3162c670d4 (diff)
downloadcpython-0b2a6dc42b9bf02408764133a8dfcd843bbd0e66.zip
cpython-0b2a6dc42b9bf02408764133a8dfcd843bbd0e66.tar.gz
cpython-0b2a6dc42b9bf02408764133a8dfcd843bbd0e66.tar.bz2
merge 3.4
-rw-r--r--Lib/test/test_json/test_encode_basestring_ascii.py3
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 8cd0c94..4bbc6c7 100644
--- a/Lib/test/test_json/test_encode_basestring_ascii.py
+++ b/Lib/test/test_json/test_encode_basestring_ascii.py
@@ -42,6 +42,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)