8000 [3.11] gh-108303: Move all inspect test files to `test_inspect/` (GH-… · python/cpython@bc9f470 · GitHub
[go: up one dir, main page]

Skip to content

Commit bc9f470

Browse files
authored
[3.11] gh-108303: Move all inspect test files to test_inspect/ (GH-109607) (#111543)
1 parent 08e4e11 commit bc9f470

11 files changed

+15
-7
lines changed

Lib/test/libregrtest/findtests.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"test_concurrent_futures",
2222
"test_future_stmt",
2323
"test_gdb",
24+
"test_inspect",
2425
"test_multiprocessing_fork",
2526
"test_multiprocessing_forkserver",
2627
"test_multiprocessing_spawn",

Lib/test/test_import/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import builtins
2-
import contextlib
32
import errno
43
import glob
54
import importlib.util

Lib/test/test_inspect/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import os
2+
from test import support
3+
4+
5+
def load_tests(*args):
6+
return support.load_package_tests(os.path.dirname(__file__), *args)
File renamed without changes.

Lib/test/test_inspect.py renamed to Lib/test/test_inspect/test_inspect.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,13 @@
3030
from test.support.import_helper import DirsOnSysPath, ready_to_import
3131
from test.support.os_helper import TESTFN
3232
from test.support.script_helper import assert_python_ok, assert_python_failure
33-
from test import inspect_fodder as mod
34-
from test import inspect_fodder2 as mod2
3533
from test import support
36-
from test import inspect_stock_annotations
37-
from test import inspect_stringized_annotations
38-
from test import inspect_stringized_annotations_2
34+
35+
from . import inspect_fodder as mod
36+
from . import inspect_fodder2 as mod2
37+
from . import inspect_stock_annotations
38+
from . import inspect_stringized_annotations
39+
from . import inspect_stringized_annotations_2
3940

4041

4142
# Functions tested in this suite:

Lib/test/test_tokenize.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1624,7 +1624,7 @@ def test_random_files(self):
16241624
# 7 more testfiles fail. Remove them also until the failure is diagnosed.
16251625

16261626
testfiles.remove(os.path.join(tempdir, "test_unicode_identifiers.py"))
1627-
for f in ('buffer', 'builtin', 'fileio', 'inspect', 'os', 'platform', 'sys'):
1627+
for f in ('buffer', 'builtin', 'fileio', 'os', 'platform', 'sys'):
16281628
testfiles.remove(os.path.join(tempdir, "test_%s.py") % f)
16291629

16301630
if not support.is_resource_enabled("cpu"):

Makefile.pre.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1969,6 +1969,7 @@ TESTSUBDIRS= ctypes/test \
19691969
test/test_email/data \
19701970
test/test_future_stmt \
19711971
test/test_gdb \
1972+
test/test_inspect \
19721973
test/test_import \
19731974
test/test_import/data \
19741975
test/test_import/data/circular_imports \

0 commit comments

Comments
 (0)
0