LEFT | RIGHT |
1 import os | 1 import os |
2 import sys | 2 import sys |
3 import json | 3 import json |
4 import doctest | 4 import doctest |
5 import unittest | 5 import unittest |
6 | 6 |
7 from test import support | 7 from test import support |
8 | 8 |
9 # import json with and without accelerations | 9 # import json with and without accelerations |
10 cjson = support.import_fresh_module('json', fresh=['_json']) | 10 cjson = support.import_fresh_module('json', fresh=['_json']) |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 | 48 |
49 def load_tests(loader, _, pattern): | 49 def load_tests(loader, _, pattern): |
50 suite = unittest.TestSuite() | 50 suite = unittest.TestSuite() |
51 for mod in (json, json.encoder, json.decoder): | 51 for mod in (json, json.encoder, json.decoder): |
52 suite.addTest(doctest.DocTestSuite(mod)) | 52 suite.addTest(doctest.DocTestSuite(mod)) |
53 suite.addTest(TestPyTest('test_pyjson')) | 53 suite.addTest(TestPyTest('test_pyjson')) |
54 suite.addTest(TestCTest('test_cjson')) | 54 suite.addTest(TestCTest('test_cjson')) |
55 | 55 |
56 pkg_dir = os.path.dirname(__file__) | 56 pkg_dir = os.path.dirname(__file__) |
57 return support.load_package_tests(pkg_dir, loader, suite, pattern) | 57 return support.load_package_tests(pkg_dir, loader, suite, pattern) |
LEFT | RIGHT |