summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_json
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2015-02-02 22:47:07 (GMT)
committerBenjamin Peterson <benjamin@python.org>2015-02-02 22:47:07 (GMT)
commit1572944499aa7d399460076bc7872ba9d5324932 (patch)
treef00f1e7ec79eb19a80ffa61a42841a863e9825a7 /Lib/test/test_json
parent0eaabf1c05127793753dbb3641d4d107b284ae77 (diff)
downloadcpython-1572944499aa7d399460076bc7872ba9d5324932.zip
cpython-1572944499aa7d399460076bc7872ba9d5324932.tar.gz
cpython-1572944499aa7d399460076bc7872ba9d5324932.tar.bz2
reduce memory usage of test (closes #23369)
Diffstat (limited to 'Lib/test/test_json')
-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 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)