diff options
author | Hai Shi <shihai1992@gmail.com> | 2020-06-25 17:17:57 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-25 17:17:57 (GMT) |
commit | 847f94f47b104aec678d1d2a2d8fe23d817f375e (patch) | |
tree | 3b247098fefe734937e9ed4e5a7388ab4da5c284 /Lib/test/test_tools | |
parent | 700cfa8c90a90016638bac13c4efd03786b2b2a0 (diff) | |
download | cpython-847f94f47b104aec678d1d2a2d8fe23d817f375e.zip cpython-847f94f47b104aec678d1d2a2d8fe23d817f375e.tar.gz cpython-847f94f47b104aec678d1d2a2d8fe23d817f375e.tar.bz2 |
bpo-40275: Use new test.support helper submodules in tests (GH-21151)
Use new test.support helper submodules in tests:
* distutils tests
* test_buffer
* test_compile
* test_filecmp
* test_fileinput
* test_readline
* test_smtpnet
* test_structmembers
* test_tools
Diffstat (limited to 'Lib/test/test_tools')
-rw-r--r-- | Lib/test/test_tools/__init__.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/test_tools/__init__.py b/Lib/test/test_tools/__init__.py index eb9acad..61af657 100644 --- a/Lib/test/test_tools/__init__.py +++ b/Lib/test/test_tools/__init__.py @@ -4,6 +4,7 @@ import importlib import os.path import unittest from test import support +from test.support import import_helper basepath = os.path.normpath( os.path.dirname( # <src/install dir> @@ -26,11 +27,11 @@ def skip_if_missing(tool=None): @contextlib.contextmanager def imports_under_tool(name, *subdirs): tooldir = os.path.join(toolsdir, name, *subdirs) - with support.DirsOnSysPath(tooldir) as cm: + with import_helper.DirsOnSysPath(tooldir) as cm: yield cm def import_tool(toolname): - with support.DirsOnSysPath(scriptsdir): + with import_helper.DirsOnSysPath(scriptsdir): return importlib.import_module(toolname) def load_tests(*args): |