diff options
author | Nick Coghlan <ncoghlan@gmail.com> | 2013-07-28 12:25:25 (GMT) |
---|---|---|
committer | Nick Coghlan <ncoghlan@gmail.com> | 2013-07-28 12:25:25 (GMT) |
commit | cf67b2a8916df3a696050b3ba36ac8049c9961f9 (patch) | |
tree | 750b0c3d2de058b15644cd25d111112ab8f94f84 /Lib/test/script_helper.py | |
parent | b8de598305428608fad9d95e890293dee4938faf (diff) | |
parent | 5517596c0428ee3620c28fd68ba5a0b1627d59b6 (diff) | |
download | cpython-cf67b2a8916df3a696050b3ba36ac8049c9961f9.zip cpython-cf67b2a8916df3a696050b3ba36ac8049c9961f9.tar.gz cpython-cf67b2a8916df3a696050b3ba36ac8049c9961f9.tar.bz2 |
Merge #15415 from 3.3
Diffstat (limited to 'Lib/test/script_helper.py')
-rw-r--r-- | Lib/test/script_helper.py | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/Lib/test/script_helper.py b/Lib/test/script_helper.py index 3c6430b..e968e98 100644 --- a/Lib/test/script_helper.py +++ b/Lib/test/script_helper.py @@ -13,7 +13,7 @@ import shutil import zipfile from importlib.util import source_from_cache -from test.support import make_legacy_pyc, strip_python_stderr +from test.support import make_legacy_pyc, strip_python_stderr, temp_dir # Executing the interpreter in a subprocess def _assert_python(expected_success, *args, **env_vars): @@ -77,16 +77,6 @@ def kill_python(p): subprocess._cleanup() return data -# Script creation utilities -@contextlib.contextmanager -def temp_dir(): - dirname = tempfile.mkdtemp() - dirname = os.path.realpath(dirname) - try: - yield dirname - finally: - shutil.rmtree(dirname) - def make_script(script_dir, script_basename, source): script_filename = script_basename+os.extsep+'py' script_name = os.path.join(script_dir, script_filename) |