A scoped change in the CWD.
Definition at line 1038 of file run_tests.py.
◆ __init__()
run_tests.DirectoryChange.__init__ |
( |
|
self, |
|
|
str |
new_cwd |
|
) |
| |
Definition at line 1045 of file run_tests.py.
1045 def __init__(self, new_cwd: str):
1046 self.new_cwd = new_cwd
1047
◆ __enter__()
run_tests.DirectoryChange.__enter__ |
( |
|
self | ) |
|
Definition at line 1048 of file run_tests.py.
1048 def __enter__(self):
1049 self.old_cwd = os.getcwd()
1050 os.chdir(self.new_cwd)
1051
◆ __exit__()
run_tests.DirectoryChange.__exit__ |
( |
|
self, |
|
|
|
exception_type, |
|
|
|
exception_value, |
|
|
|
exception_traceback |
|
) |
| |
Definition at line 1052 of file run_tests.py.
1052 def __exit__(self, exception_type, exception_value, exception_traceback):
1053 os.chdir(self.old_cwd)
1054
1055
◆ new_cwd [1/2]
str run_tests.DirectoryChange.new_cwd = '' |
|
static |
◆ new_cwd [2/2]
run_tests.DirectoryChange.new_cwd |
◆ old_cwd [1/2]
str run_tests.DirectoryChange.old_cwd = '' |
|
static |
◆ old_cwd [2/2]
run_tests.DirectoryChange.old_cwd |
The documentation for this class was generated from the following file: