#5723: merge with 3.1.

This commit is contained in:
Ezio Melotti 2011-05-14 06:47:51 +03:00
parent 3659f27ad3
commit 6b60fb9148
19 changed files with 253 additions and 218 deletions

View file

@ -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