test_pass2.py 386 B

1234567891011121314
  1. from unittest import TestCase
  2. import simplejson as json
  3. # from http://json.org/JSON_checker/test/pass2.json
  4. JSON = r'''
  5. [[[[[[[[[[[[[[[[[[["Not too deep"]]]]]]]]]]]]]]]]]]]
  6. '''
  7. class TestPass2(TestCase):
  8. def test_parse(self):
  9. # test in/out equivalence and parsing
  10. res = json.loads(JSON)
  11. out = json.dumps(res)
  12. self.assertEqual(res, json.loads(out))