Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(148)

Unified Diff: Lib/json/tests/test_decode.py

Issue 7311: [issue4136] merge json library with simplejson 2.0.3 Base URL: http://svn.python.org/view/*checkout*/python/trunk/
Patch Set: Created 5 years, 6 months ago , Downloaded from: http://bugs.python.org/file11822/json_issue4136_r66961.diff
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Lib/json/tests/test_decode.py
===================================================================
--- Lib/json/tests/test_decode.py (revision 66961)
+++ Lib/json/tests/test_decode.py (working copy)
@@ -13,3 +13,10 @@
rval = json.loads('1', parse_int=float)
self.assert_(isinstance(rval, float))
self.assertEquals(rval, 1.0)
+
+ def test_decoder_optimizations(self):
+ # Several optimizations were made that skip over calls to
+ # the whitespace regex, so this test is designed to try and
+ # exercise the uncommon cases. The array cases are already covered.
+ rval = json.loads('{ "key" : "value" , "k":"v" }')
+ self.assertEquals(rval, {"key":"value", "k":"v"})

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld 1278:e6ce13d99bf5