diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py index 8d1bb59453a..73ad95ea3c6 100644 --- a/Lib/test/test_posix.py +++ b/Lib/test/test_posix.py @@ -248,8 +248,8 @@ def _create_and_do_getcwd(dirname, current_path_length = 0): _create_and_do_getcwd(dirname) finally: - support.rmtree(base_path) os.chdir(curdir) + support.rmtree(base_path) def test_main():