mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
#5723: merge with 3.1.
This commit is contained in:
parent
3659f27ad3
commit
6b60fb9148
19 changed files with 253 additions and 218 deletions
|
|
@ -1,6 +1,5 @@
|
|||
from unittest import TestCase
|
||||
from test.json_tests import PyTest, CTest
|
||||
|
||||
import json
|
||||
|
||||
# from http://json.org/JSON_checker/test/pass3.json
|
||||
JSON = r'''
|
||||
|
|
@ -12,9 +11,14 @@ JSON = r'''
|
|||
}
|
||||
'''
|
||||
|
||||
class TestPass3(TestCase):
|
||||
|
||||
class TestPass3:
|
||||
def test_parse(self):
|
||||
# test in/out equivalence and parsing
|
||||
res = json.loads(JSON)
|
||||
out = json.dumps(res)
|
||||
self.assertEqual(res, json.loads(out))
|
||||
res = self.loads(JSON)
|
||||
out = self.dumps(res)
|
||||
self.assertEqual(res, self.loads(out))
|
||||
|
||||
|
||||
class TestPyPass3(TestPass3, PyTest): pass
|
||||
class TestCPass3(TestPass3, CTest): pass
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue