Skip to content

Commit f0002fe

Browse files
committed
[3.12] pythongh-108303: Move all inspect test files to test_inspect/ (pythonGH-109607)
(cherry picked from commit 732532b) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
1 parent c06ac1b commit f0002fe

11 files changed

Lines changed: 15 additions & 7 deletions

Lib/test/libregrtest/runtest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@ def iter_tests(self):
234234
"test_concurrent_futures",
235235
"test_future_stmt",
236236
"test_gdb",
237+
"test_inspect",
237238
"test_multiprocessing_fork",
238239
"test_multiprocessing_forkserver",
239240
"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.
File renamed without changes.
File renamed without changes.
Lines changed: 6 additions & 5 deletions
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

Lines changed: 1 addition & 1 deletion
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"):

0 commit comments

Comments
 (0)