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