summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_cmd_line_script.py
diff options
context:
space:
mode:
authorNick Coghlan <ncoghlan@gmail.com>2013-07-28 12:25:25 (GMT)
committerNick Coghlan <ncoghlan@gmail.com>2013-07-28 12:25:25 (GMT)
commitcf67b2a8916df3a696050b3ba36ac8049c9961f9 (patch)
tree750b0c3d2de058b15644cd25d111112ab8f94f84 /Lib/test/test_cmd_line_script.py
parentb8de598305428608fad9d95e890293dee4938faf (diff)
parent5517596c0428ee3620c28fd68ba5a0b1627d59b6 (diff)
downloadcpython-cf67b2a8916df3a696050b3ba36ac8049c9961f9.zip
cpython-cf67b2a8916df3a696050b3ba36ac8049c9961f9.tar.gz
cpython-cf67b2a8916df3a696050b3ba36ac8049c9961f9.tar.bz2
Merge #15415 from 3.3
Diffstat (limited to 'Lib/test/test_cmd_line_script.py')
-rw-r--r--Lib/test/test_cmd_line_script.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_cmd_line_script.py b/Lib/test/test_cmd_line_script.py
index 6051e18..b4269b9 100644
--- a/Lib/test/test_cmd_line_script.py
+++ b/Lib/test/test_cmd_line_script.py
@@ -290,7 +290,7 @@ class CmdLineTest(unittest.TestCase):
# Make sure package __init__ modules see "-m" in sys.argv0 while
# searching for the module to execute
with temp_dir() as script_dir:
- with support.temp_cwd(path=script_dir):
+ with support.change_cwd(path=script_dir):
pkg_dir = os.path.join(script_dir, 'test_pkg')
make_pkg(pkg_dir, "import sys; print('init_argv0==%r' % sys.argv[0])")
script_name = _make_test_script(pkg_dir, 'script')
@@ -307,7 +307,7 @@ class CmdLineTest(unittest.TestCase):
# Make sure a "-c" file in the current directory
# does not alter the value of sys.path[0]
with temp_dir() as script_dir:
- with support.temp_cwd(path=script_dir):
+ with support.change_cwd(path=script_dir):
with open("-c", "w") as f:
f.write("data")
rc, out, err = assert_python_ok('-c',
@@ -322,7 +322,7 @@ class CmdLineTest(unittest.TestCase):
# does not alter the value of sys.path[0]
with temp_dir() as script_dir:
script_name = _make_test_script(script_dir, 'other')
- with support.temp_cwd(path=script_dir):
+ with support.change_cwd(path=script_dir):
with open("-m", "w") as f:
f.write("data")
rc, out, err = assert_python_ok('-m', 'other', *example_args)
@@ -335,7 +335,7 @@ class CmdLineTest(unittest.TestCase):
# and results in an error that the return code to the
# shell is '1'
with temp_dir() as script_dir:
- with support.temp_cwd(path=script_dir):
+ with support.change_cwd(path=script_dir):
pkg_dir = os.path.join(script_dir, 'test_pkg')
make_pkg(pkg_dir)
script_name = _make_test_script(pkg_dir, 'other',