diff options
author | Bob Ippolito <bob@redivi.com> | 2013-01-01 13:17:38 -0800 |
---|---|---|
committer | Bob Ippolito <bob@redivi.com> | 2013-01-01 13:17:38 -0800 |
commit | 03396cb26b6165814150461ec9f49343c151d862 (patch) | |
tree | f804ca341d700d8c14d2d2a016532d93f6c46c97 /simplejson/tests | |
parent | 02e24f4f856b065aa31d79d4726ce6668a20779e (diff) | |
download | simplejson-03396cb26b6165814150461ec9f49343c151d862.tar.gz |
_Py_Accu style encoder optimization, bump to 3.0.1v3.0.1
Diffstat (limited to 'simplejson/tests')
-rw-r--r-- | simplejson/tests/test_dump.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/simplejson/tests/test_dump.py b/simplejson/tests/test_dump.py index e8c6054..0ad2c40 100644 --- a/simplejson/tests/test_dump.py +++ b/simplejson/tests/test_dump.py @@ -114,3 +114,8 @@ class TestDump(TestCase): s = json.dumps([0, 1, 2], indent=AwesomeInt(3)) self.assertEqual(s, '[\n 0,\n 1,\n 2\n]') + + def test_accumulator(self): + # the C API uses an accumulator that collects after 100,000 appends + lst = [0] * 100000 + self.assertEqual(json.loads(json.dumps(lst)), lst) |