mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
port simplejson upgrade from the trunk #4136
json also now works only with unicode strings Patch by Antoine Pitrou; updated by me
This commit is contained in:
parent
7255f18556
commit
c6b607d4a9
15 changed files with 2011 additions and 959 deletions
|
@ -32,3 +32,10 @@ class TestDecode(TestCase):
|
|||
object_pairs_hook = OrderedDict,
|
||||
object_hook = lambda x: None),
|
||||
OrderedDict(p))
|
||||
|
||||
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