mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
merge json library with simplejson 2.0.9 (issue 4136)
This commit is contained in:
parent
277859d591
commit
d914e3f861
13 changed files with 2430 additions and 582 deletions
|
@ -13,3 +13,10 @@ class TestDecode(TestCase):
|
|||
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"})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue