diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-09-06 11:13:25 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-09-06 11:13:25 (GMT) |
commit | 2a23adf4405bcd903aabf445dd54867d95f494a1 (patch) | |
tree | fc4c823138cb505c180873976bc0a41ac3a1f6d5 /Lib/test/test_subprocess.py | |
parent | ef920d6d5e38cebd51b17001d614b55b1c468041 (diff) | |
download | cpython-2a23adf4405bcd903aabf445dd54867d95f494a1.zip cpython-2a23adf4405bcd903aabf445dd54867d95f494a1.tar.gz cpython-2a23adf4405bcd903aabf445dd54867d95f494a1.tar.bz2 |
Use support.change_cwd() in tests.
Diffstat (limited to 'Lib/test/test_subprocess.py')
-rw-r--r-- | Lib/test/test_subprocess.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py index 3591b5e..e1b8c36 100644 --- a/Lib/test/test_subprocess.py +++ b/Lib/test/test_subprocess.py @@ -317,11 +317,8 @@ class ProcessTestCase(BaseTestCase): # Normalize an expected cwd (for Tru64 support). # We can't use os.path.realpath since it doesn't expand Tru64 {memb} # strings. See bug #1063571. - original_cwd = os.getcwd() - os.chdir(cwd) - cwd = os.getcwd() - os.chdir(original_cwd) - return cwd + with support.change_cwd(cwd): + return os.getcwd() # For use in the test_cwd* tests below. def _split_python_path(self): |