From 1572944499aa7d399460076bc7872ba9d5324932 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Mon, 2 Feb 2015 17:47:07 -0500 Subject: reduce memory usage of test (closes #23369) --- Lib/test/test_json/test_encode_basestring_ascii.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -- cgit v0.12