ยปCore Development>Code coverage>Lib/json/tests/test_pass3.py

Python code coverage for Lib/json/tests/test_pass3.py

#countcontent
1n/afrom unittest import TestCase
2n/a
3n/aimport json
4n/a
5n/a# from http://json.org/JSON_checker/test/pass3.json
6n/aJSON = r'''
7n/a{
8n/a "JSON Test Pattern pass3": {
9n/a "The outermost value": "must be an object or array.",
10n/a "In this test": "It is an object."
11n/a }
12n/a}
13n/a'''
14n/a
15n/aclass TestPass3(TestCase):
16n/a def test_parse(self):
17n/a # test in/out equivalence and parsing
18n/a res = json.loads(JSON)
19n/a out = json.dumps(res)
20n/a self.assertEqual(res, json.loads(out))