summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_import
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2015-05-06 03:33:17 (GMT)
committerBerker Peksag <berker.peksag@gmail.com>2015-05-06 03:33:17 (GMT)
commitce643913a9049953950918b214fb7cef40506be5 (patch)
treef9a84aa003a3af7eaba270e949691b7d71e8d699 /Lib/test/test_import
parent025e9ebd0a0a19f50ca83af6ada0ac65be1fa2a1 (diff)
downloadcpython-ce643913a9049953950918b214fb7cef40506be5.zip
cpython-ce643913a9049953950918b214fb7cef40506be5.tar.gz
cpython-ce643913a9049953950918b214fb7cef40506be5.tar.bz2
Issue #9517: Move script_helper to the support package.
Patch by Christie Wilson.
Diffstat (limited to 'Lib/test/test_import')
-rw-r--r--Lib/test/test_import/__init__.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/test/test_import/__init__.py b/Lib/test/test_import/__init__.py
index 9b4cac9..586478f 100644
--- a/Lib/test/test_import/__init__.py
+++ b/Lib/test/test_import/__init__.py
@@ -21,8 +21,9 @@ import test.support
from test.support import (
EnvironmentVarGuard, TESTFN, check_warnings, forget, is_jython,
make_legacy_pyc, rmtree, run_unittest, swap_attr, swap_item, temp_umask,
- unlink, unload, create_empty_file, cpython_only, TESTFN_UNENCODABLE)
-from test import script_helper
+ unlink, unload, create_empty_file, cpython_only, TESTFN_UNENCODABLE,
+ temp_dir)
+from test.support import script_helper
skip_if_dont_write_bytecode = unittest.skipIf(
@@ -45,7 +46,7 @@ def _ready_to_import(name=None, source=""):
# temporarily clears the module from sys.modules (if any)
# reverts or removes the module when cleaning up
name = name or "spam"
- with script_helper.temp_dir() as tempdir:
+ with temp_dir() as tempdir:
path = script_helper.make_script(tempdir, name, source)
old_module = sys.modules.pop(name, None)
try: