From: Benjamin Peterson Date: Mon, 2 Feb 2015 22:47:07 +0000 (-0500) Subject: reduce memory usage of test (closes #23369) X-Git-Tag: v3.4.3rc1~28^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1572944499aa7d399460076bc7872ba9d5324932;p=python reduce memory usage of test (closes #23369) --- diff --git a/Lib/test/test_json/test_encode_basestring_ascii.py b/Lib/test/test_json/test_encode_basestring_ascii.py index a2bbc7d5ee..2122da17fd 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)