8000 gh-108303: Move all inspect test files to `test_inspect/` (#109607) · python/cpython@732532b · GitHub
[go: up one dir, main page]

Skip to content

Commit 732532b

Browse files
authored
gh-108303: Move all inspect test files to test_inspect/ (#109607)
1 parent 9cfb4e0 commit 732532b

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
@@ -20,6 +20,7 @@
2020
"test_concurrent_futures",
2121
"test_future_stmt",
2222
"test_gdb",
23+
"test_inspect",
2324
"test_multiprocessing_fork",
2425
"test_multiprocessing_forkserver",
2526
"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 json

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
@@ -36,12 +36,13 @@
3636
from test.support.import_helper import DirsOnSysPath, ready_to_import
3737
from test.support.os_helper import TESTFN
3838
from test.support.script_helper import assert_python_ok, assert_python_failure
39-
from test import inspect_fodder as mod
40-
from test import inspect_fodder2 as mod2
4139
from test import support
42-
from test import inspect_stock_annotations
43-
from test import inspect_stringized_annotations
44-
from test import inspect_stringized_annotations_2
40+
41+
from . import inspect_fodder as mod
42+
from . import inspect_fodder2 as mod2
43+
from . import inspect_stock_annotations
44+
from . import inspect_stringized_annotations
45+
from . import inspect_stringized_annotations_2
4546

4647

4748
# Functions tested in this suite:

Lib/test/test_tokenize.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1911,7 +1911,7 @@ def test_random_files(self):
19111911
# TODO: Remove this once we can untokenize PEP 701 syntax
19121912
testfiles.remove(os.path.join(tempdir, "test_fstring.py"))
19131913

1914-
for f in ('buffer', 'builtin', 'fileio', 'inspect', 'os', 'platform', 'sys'):
1914+
for f in ('buffer', 'builtin', 'fileio', 'os', 'platform', 'sys'):
19151915
testfiles.remove(os.path.join(tempdir, "test_%s.py") % f)
19161916

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

Makefile.pre.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2147,6 +2147,7 @@ TESTSUBDIRS= idlelib/idle_test \
21472147
test/test_email/data \
21482148
test/test_future_stmt \
21492149
test/test_gdb \
2150+
test/test_inspect \
21502151
test/test_import \
21512152
test/test_import/data \
21522153
test/test_import/data/circular_imports \

0 commit comments

Comments
 (0)
0