ยปCore Development>Code coverage>Lib/test/test_json/test_pass3.py

Python code coverage for Lib/test/test_json/test_pass3.py

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