~pythonregexp2.7/python/issue2636

« back to all changes in this revision

Viewing changes to Lib/json/tests/test_pass2.py

  • Committer: Jeffrey C. "The TimeHorse" Jacobs
  • Date: 2008-05-24 16:05:21 UTC
  • mfrom: (39021.1.401 Regexp-2.6)
  • Revision ID: darklord@timehorse.com-20080524160521-1xenj7p6u3wb89et
Merged in changes from the latest python source snapshot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
from unittest import TestCase
 
2
import json
 
3
 
 
4
# from http://json.org/JSON_checker/test/pass2.json
 
5
JSON = r'''
 
6
[[[[[[[[[[[[[[[[[[["Not too deep"]]]]]]]]]]]]]]]]]]]
 
7
'''
 
8
 
 
9
class 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))