From: Alexander Belopolsky Date: Tue, 30 Nov 2010 03:03:30 +0000 (+0000) Subject: Issue #10572: Moved json tests to Lib/test/json_tests. X-Git-Tag: v3.2b1~172 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ff27ee0b400030419cfd3c9966f275bfbcb569f8;p=thirdparty%2FPython%2Fcpython.git Issue #10572: Moved json tests to Lib/test/json_tests. Approved by Raymond Hettinger. --- diff --git a/Lib/json/tests/__init__.py b/Lib/test/json_tests/__init__.py similarity index 94% rename from Lib/json/tests/__init__.py rename to Lib/test/json_tests/__init__.py index 1a1e3e6d5a7d..4977468e47aa 100644 --- a/Lib/json/tests/__init__.py +++ b/Lib/test/json_tests/__init__.py @@ -10,7 +10,7 @@ def test_suite(): loader = unittest.TestLoader() for fn in os.listdir(here): if fn.startswith("test") and fn.endswith(".py"): - modname = "json.tests." + fn[:-3] + modname = "test.json_tests." + fn[:-3] __import__(modname) module = sys.modules[modname] suite.addTests(loader.loadTestsFromModule(module)) diff --git a/Lib/json/tests/test_decode.py b/Lib/test/json_tests/test_decode.py similarity index 100% rename from Lib/json/tests/test_decode.py rename to Lib/test/json_tests/test_decode.py diff --git a/Lib/json/tests/test_default.py b/Lib/test/json_tests/test_default.py similarity index 100% rename from Lib/json/tests/test_default.py rename to Lib/test/json_tests/test_default.py diff --git a/Lib/json/tests/test_dump.py b/Lib/test/json_tests/test_dump.py similarity index 100% rename from Lib/json/tests/test_dump.py rename to Lib/test/json_tests/test_dump.py diff --git a/Lib/json/tests/test_encode_basestring_ascii.py b/Lib/test/json_tests/test_encode_basestring_ascii.py similarity index 100% rename from Lib/json/tests/test_encode_basestring_ascii.py rename to Lib/test/json_tests/test_encode_basestring_ascii.py diff --git a/Lib/json/tests/test_fail.py b/Lib/test/json_tests/test_fail.py similarity index 100% rename from Lib/json/tests/test_fail.py rename to Lib/test/json_tests/test_fail.py diff --git a/Lib/json/tests/test_float.py b/Lib/test/json_tests/test_float.py similarity index 100% rename from Lib/json/tests/test_float.py rename to Lib/test/json_tests/test_float.py diff --git a/Lib/json/tests/test_indent.py b/Lib/test/json_tests/test_indent.py similarity index 100% rename from Lib/json/tests/test_indent.py rename to Lib/test/json_tests/test_indent.py diff --git a/Lib/json/tests/test_pass1.py b/Lib/test/json_tests/test_pass1.py similarity index 100% rename from Lib/json/tests/test_pass1.py rename to Lib/test/json_tests/test_pass1.py diff --git a/Lib/json/tests/test_pass2.py b/Lib/test/json_tests/test_pass2.py similarity index 100% rename from Lib/json/tests/test_pass2.py rename to Lib/test/json_tests/test_pass2.py diff --git a/Lib/json/tests/test_pass3.py b/Lib/test/json_tests/test_pass3.py similarity index 100% rename from Lib/json/tests/test_pass3.py rename to Lib/test/json_tests/test_pass3.py diff --git a/Lib/json/tests/test_recursion.py b/Lib/test/json_tests/test_recursion.py similarity index 100% rename from Lib/json/tests/test_recursion.py rename to Lib/test/json_tests/test_recursion.py diff --git a/Lib/json/tests/test_scanstring.py b/Lib/test/json_tests/test_scanstring.py similarity index 100% rename from Lib/json/tests/test_scanstring.py rename to Lib/test/json_tests/test_scanstring.py diff --git a/Lib/json/tests/test_separators.py b/Lib/test/json_tests/test_separators.py similarity index 100% rename from Lib/json/tests/test_separators.py rename to Lib/test/json_tests/test_separators.py diff --git a/Lib/json/tests/test_speedups.py b/Lib/test/json_tests/test_speedups.py similarity index 100% rename from Lib/json/tests/test_speedups.py rename to Lib/test/json_tests/test_speedups.py diff --git a/Lib/json/tests/test_unicode.py b/Lib/test/json_tests/test_unicode.py similarity index 100% rename from Lib/json/tests/test_unicode.py rename to Lib/test/json_tests/test_unicode.py diff --git a/Lib/test/test_json.py b/Lib/test/test_json.py index a4b6e7a8294c..41ff8974fc79 100644 --- a/Lib/test/test_json.py +++ b/Lib/test/test_json.py @@ -5,12 +5,12 @@ the test_suite() function there returns a test suite that's ready to be run. """ -import json.tests +from test import json_tests import test.support def test_main(): - test.support.run_unittest(json.tests.test_suite()) + test.support.run_unittest(json_tests.test_suite()) if __name__ == "__main__": diff --git a/Makefile.pre.in b/Makefile.pre.in index c605b2140945..28b3001ee812 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -890,7 +890,7 @@ LIBSUBDIRS= tkinter tkinter/test tkinter/test/test_tkinter \ test/tracedmodules test/encoded_modules \ concurrent concurrent/futures encodings \ email email/mime email/test email/test/data \ - html json json/tests http dbm xmlrpc \ + html json test/json_tests http dbm xmlrpc \ sqlite3 sqlite3/test \ logging csv wsgiref urllib \ lib2to3 lib2to3/fixes lib2to3/pgen2 lib2to3/tests \