Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0102faf

Browse files
authored
[3.12] gh-108303: Move all inspect test files to test_inspect/ (GH-109607) (#110732)
(cherry picked from commit 732532b)
1 parent 49da117 commit 0102faf

11 files changed

+15
-7
lines changed

Lib/test/libregrtest/findtests.py

+1
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

-1
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

+6
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

+6-5
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,13 @@
3131
from test.support.import_helper import DirsOnSysPath, ready_to_import
3232
from test.support.os_helper import TESTFN
3333
from test.support.script_helper import assert_python_ok, assert_python_failure
34-
from test import inspect_fodder as mod
35-
from test import inspect_fodder2 as mod2
3634
from test import support
37-
from test import inspect_stock_annotations
38-
from test import inspect_stringized_annotations
39-
from test import inspect_stringized_annotations_2
35+
36+
from . import inspect_fodder as mod
37+
from . import inspect_fodder2 as mod2
38+
from . import inspect_stock_annotations
39+
from . import inspect_stringized_annotations
40+
from . import inspect_stringized_annotations_2
4041

4142

4243
# Functions tested in this suite:

Lib/test/test_tokenize.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1908,7 +1908,7 @@ def test_random_files(self):
19081908
# TODO: Remove this once we can untokenize PEP 701 syntax
19091909
testfiles.remove(os.path.join(tempdir, "test_fstring.py"))
19101910

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

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

Makefile.pre.in

+1
Original file line numberDiff line numberDiff line change
@@ -2141,6 +2141,7 @@ TESTSUBDIRS= idlelib/idle_test \
21412141
test/test_email/data \
21422142
test/test_future_stmt \
21432143
test/test_gdb \
2144+
test/test_inspect \
21442145
test/test_import \
21452146
test/test_import/data \
21462147
test/test_import/data/circular_imports \

0 commit comments

Comments
 (0)