diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py index d593fc18d96e174..0f294c5b0f456ed 100644 --- a/Lib/test/support/__init__.py +++ b/Lib/test/support/__init__.py @@ -1068,7 +1068,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