PageRenderTime 21ms CodeModel.GetById 12ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/Lib/json/tests/test_pass2.py

http://unladen-swallow.googlecode.com/
Python | 14 lines | 12 code | 1 blank | 1 comment | 0 complexity | 8caf0a5f325985b32585d4dc450c8193 MD5 | raw file
 1from unittest import TestCase
 2import json
 3
 4# from http://json.org/JSON_checker/test/pass2.json
 5JSON = r'''
 6[[[[[[[[[[[[[[[[[[["Not too deep"]]]]]]]]]]]]]]]]]]]
 7'''
 8
 9class TestPass2(TestCase):
10    def test_parse(self):
11        # test in/out equivalence and parsing
12        res = json.loads(JSON)
13        out = json.dumps(res)
14        self.assertEquals(res, json.loads(out))