diff options
author | Nikita Sobolev <mail@sobolevn.me> | 2023-09-21 07:39:36 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-21 07:39:36 (GMT) |
commit | 115c49ad5a5ccfb628fef3ae06a566f7a0197f97 (patch) | |
tree | ff301179b73f6523a6bbe2ca1c0bb37cda7e3fb8 /Lib/test/test_inspect.py | |
parent | 712cb173f8e1d02c625a40ae03bba57b0c1c032a (diff) | |
download | cpython-115c49ad5a5ccfb628fef3ae06a566f7a0197f97.zip cpython-115c49ad5a5ccfb628fef3ae06a566f7a0197f97.tar.gz cpython-115c49ad5a5ccfb628fef3ae06a566f7a0197f97.tar.bz2 |
gh-109625: Move _ready_to_import() from test_import to support.import_helper (#109626)
Diffstat (limited to 'Lib/test/test_inspect.py')
-rw-r--r-- | Lib/test/test_inspect.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Lib/test/test_inspect.py b/Lib/test/test_inspect.py index 2fb356a..f9bd632 100644 --- a/Lib/test/test_inspect.py +++ b/Lib/test/test_inspect.py @@ -33,7 +33,7 @@ except ImportError: from test.support import cpython_only from test.support import MISSING_C_DOCSTRINGS, ALWAYS_EQ -from test.support.import_helper import DirsOnSysPath +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 @@ -43,8 +43,6 @@ from test import inspect_stock_annotations from test import inspect_stringized_annotations from test import inspect_stringized_annotations_2 -from test.test_import import _ready_to_import - # Functions tested in this suite: # ismodule, isclass, ismethod, isfunction, istraceback, isframe, iscode, @@ -4954,7 +4952,7 @@ def foo(): def test_getsource_reload(self): # see issue 1218234 - with _ready_to_import('reload_bug', self.src_before) as (name, path): + with ready_to_import('reload_bug', self.src_before) as (name, path): module = importlib.import_module(name) self.assertInspectEqual(path, module) with open(path, 'w', encoding='utf-8') as src: |