mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
Merge with 3.1.
This commit is contained in:
commit
04c6423fba
5 changed files with 34 additions and 9 deletions
|
|
@ -31,6 +31,11 @@ class TestDecode(TestCase):
|
|||
self.assertTrue(isinstance(rval, float))
|
||||
self.assertEqual(rval, 1.0)
|
||||
|
||||
def test_empty_objects(self):
|
||||
self.assertEqual(json.loads('{}'), {})
|
||||
self.assertEqual(json.loads('[]'), [])
|
||||
self.assertEqual(json.loads('""'), "")
|
||||
|
||||
def test_object_pairs_hook(self):
|
||||
s = '{"xkd":1, "kcw":2, "art":3, "hxm":4, "qrt":5, "pad":6, "hoy":7}'
|
||||
p = [("xkd", 1), ("kcw", 2), ("art", 3), ("hxm", 4),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue