diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py index 2ff7640535e955..d6a7819cb01398 100644 --- a/Lib/test/support/__init__.py +++ b/Lib/test/support/__init__.py @@ -1066,7 +1066,7 @@ def change_cwd(path, quiet=False): """ saved_dir = os.getcwd() try: - os.chdir(path) + os.chdir(os.path.realpath(path)) except OSError as exc: if not quiet: raise