diff options
author | Nikita Sobolev <mail@sobolevn.me> | 2023-10-10 20:15:11 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-10 20:15:11 (GMT) |
commit | 732532b0af9d1b5c7ae4932526c8d20d86c15507 (patch) | |
tree | 36cee3d5f6afa96233d5e8b930ab764351050ca4 | |
parent | 9cfb4e0d1ebf2900c19ee07697818c621f46cc3d (diff) | |
download | cpython-732532b0af9d1b5c7ae4932526c8d20d86c15507.zip cpython-732532b0af9d1b5c7ae4932526c8d20d86c15507.tar.gz cpython-732532b0af9d1b5c7ae4932526c8d20d86c15507.tar.bz2 |
gh-108303: Move all inspect test files to `test_inspect/` (#109607)
-rw-r--r-- | Lib/test/libregrtest/findtests.py | 1 | ||||
-rw-r--r-- | Lib/test/test_import/__init__.py | 1 | ||||
-rw-r--r-- | Lib/test/test_inspect/__init__.py | 6 | ||||
-rw-r--r-- | Lib/test/test_inspect/inspect_fodder.py (renamed from Lib/test/inspect_fodder.py) | 0 | ||||
-rw-r--r-- | Lib/test/test_inspect/inspect_fodder2.py (renamed from Lib/test/inspect_fodder2.py) | 0 | ||||
-rw-r--r-- | Lib/test/test_inspect/inspect_stock_annotations.py (renamed from Lib/test/inspect_stock_annotations.py) | 0 | ||||
-rw-r--r-- | Lib/test/test_inspect/inspect_stringized_annotations.py (renamed from Lib/test/inspect_stringized_annotations.py) | 0 | ||||
-rw-r--r-- | Lib/test/test_inspect/inspect_stringized_annotations_2.py (renamed from Lib/test/inspect_stringized_annotations_2.py) | 0 | ||||
-rw-r--r-- | Lib/test/test_inspect/test_inspect.py (renamed from Lib/test/test_inspect.py) | 11 | ||||
-rw-r--r-- | Lib/test/test_tokenize.py | 2 | ||||
-rw-r--r-- | Makefile.pre.in | 1 |
11 files changed, 15 insertions, 7 deletions
diff --git a/Lib/test/libregrtest/findtests.py b/Lib/test/libregrtest/findtests.py index 96cc3e0..caf2872 100644 --- a/Lib/test/libregrtest/findtests.py +++ b/Lib/test/libregrtest/findtests.py @@ -20,6 +20,7 @@ SPLITTESTDIRS: set[TestName] = { "test_concurrent_futures", "test_future_stmt", "test_gdb", + "test_inspect", "test_multiprocessing_fork", "test_multiprocessing_forkserver", "test_multiprocessing_spawn", diff --git a/Lib/test/test_import/__init__.py b/Lib/test/test_import/__init__.py index 48553f9..aa465c7 100644 --- a/Lib/test/test_import/__init__.py +++ b/Lib/test/test_import/__init__.py @@ -1,5 +1,4 @@ import builtins -import contextlib import errno import glob import json diff --git a/Lib/test/test_inspect/__init__.py b/Lib/test/test_inspect/__init__.py new file mode 100644 index 0000000..f2a39a3 --- /dev/null +++ b/Lib/test/test_inspect/__init__.py @@ -0,0 +1,6 @@ +import os +from test import support + + +def load_tests(*args): + return support.load_package_tests(os.path.dirname(__file__), *args) diff --git a/Lib/test/inspect_fodder.py b/Lib/test/test_inspect/inspect_fodder.py index 60ba7aa..60ba7aa 100644 --- a/Lib/test/inspect_fodder.py +++ b/Lib/test/test_inspect/inspect_fodder.py diff --git a/Lib/test/inspect_fodder2.py b/Lib/test/test_inspect/inspect_fodder2.py index 8639cf2..8639cf2 100644 --- a/Lib/test/inspect_fodder2.py +++ b/Lib/test/test_inspect/inspect_fodder2.py diff --git a/Lib/test/inspect_stock_annotations.py b/Lib/test/test_inspect/inspect_stock_annotations.py index d115a25..d115a25 100644 --- a/Lib/test/inspect_stock_annotations.py +++ b/Lib/test/test_inspect/inspect_stock_annotations.py diff --git a/Lib/test/inspect_stringized_annotations.py b/Lib/test/test_inspect/inspect_stringized_annotations.py index a56fb05..a56fb05 100644 --- a/Lib/test/inspect_stringized_annotations.py +++ b/Lib/test/test_inspect/inspect_stringized_annotations.py diff --git a/Lib/test/inspect_stringized_annotations_2.py b/Lib/test/test_inspect/inspect_stringized_annotations_2.py index 87206d5..87206d5 100644 --- a/Lib/test/inspect_stringized_annotations_2.py +++ b/Lib/test/test_inspect/inspect_stringized_annotations_2.py diff --git a/Lib/test/test_inspect.py b/Lib/test/test_inspect/test_inspect.py index f9bd632..31ac6b1 100644 --- a/Lib/test/test_inspect.py +++ b/Lib/test/test_inspect/test_inspect.py @@ -36,12 +36,13 @@ from test.support import MISSING_C_DOCSTRINGS, ALWAYS_EQ from test.support.import_helper import DirsOnSysPath, ready_to_import from test.support.os_helper import TESTFN from test.support.script_helper import assert_python_ok, assert_python_failure -from test import inspect_fodder as mod -from test import inspect_fodder2 as mod2 from test import support -from test import inspect_stock_annotations -from test import inspect_stringized_annotations -from test import inspect_stringized_annotations_2 + +from . import inspect_fodder as mod +from . import inspect_fodder2 as mod2 +from . import inspect_stock_annotations +from . import inspect_stringized_annotations +from . import inspect_stringized_annotations_2 # Functions tested in this suite: diff --git a/Lib/test/test_tokenize.py b/Lib/test/test_tokenize.py index 9369560..06517ac 100644 --- a/Lib/test/test_tokenize.py +++ b/Lib/test/test_tokenize.py @@ -1911,7 +1911,7 @@ class TestRoundtrip(TestCase): # TODO: Remove this once we can untokenize PEP 701 syntax testfiles.remove(os.path.join(tempdir, "test_fstring.py")) - for f in ('buffer', 'builtin', 'fileio', 'inspect', 'os', 'platform', 'sys'): + for f in ('buffer', 'builtin', 'fileio', 'os', 'platform', 'sys'): testfiles.remove(os.path.join(tempdir, "test_%s.py") % f) if not support.is_resource_enabled("cpu"): diff --git a/Makefile.pre.in b/Makefile.pre.in index 043000c..f612f07 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -2147,6 +2147,7 @@ TESTSUBDIRS= idlelib/idle_test \ test/test_email/data \ test/test_future_stmt \ test/test_gdb \ + test/test_inspect \ test/test_import \ test/test_import/data \ test/test_import/data/circular_imports \ |