From 2b9b671b0f0239e6460911dd88585ac24ed04f70 Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Fri, 11 Oct 2019 16:01:15 -0700 Subject: [PATCH] bpo-38453: Resolve test directories before chdir to them --- Lib/test/support/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py index d593fc18d96e17..0f294c5b0f456e 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