mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Use support.change_cwd() in tests.
This commit is contained in:
commit
5fbadb63ef
9 changed files with 34 additions and 104 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue