]> git.proxmox.com Git - mirror_edk2.git/blobdiff - AppPkg/Applications/Python/Python-2.7.10/Lib/json/tests/test_pass3.py
AppPkg/Applications/Python/Python-2.7.10: Initial Checkin part 4/5.
[mirror_edk2.git] / AppPkg / Applications / Python / Python-2.7.10 / Lib / json / tests / test_pass3.py
diff --git a/AppPkg/Applications/Python/Python-2.7.10/Lib/json/tests/test_pass3.py b/AppPkg/Applications/Python/Python-2.7.10/Lib/json/tests/test_pass3.py
new file mode 100644 (file)
index 0000000..8dc6d76
--- /dev/null
@@ -0,0 +1,24 @@
+from json.tests import PyTest, CTest\r
+\r
+\r
+# from http://json.org/JSON_checker/test/pass3.json\r
+JSON = r'''\r
+{\r
+    "JSON Test Pattern pass3": {\r
+        "The outermost value": "must be an object or array.",\r
+        "In this test": "It is an object."\r
+    }\r
+}\r
+'''\r
+\r
+\r
+class TestPass3(object):\r
+    def test_parse(self):\r
+        # test in/out equivalence and parsing\r
+        res = self.loads(JSON)\r
+        out = self.dumps(res)\r
+        self.assertEqual(res, self.loads(out))\r
+\r
+\r
+class TestPyPass3(TestPass3, PyTest): pass\r
+class TestCPass3(TestPass3, CTest): pass\r