From: Steve Dower Date: Mon, 14 Oct 2019 15:42:21 +0000 (-0700) Subject: bpo-38453: Resolve test directories before chdir to them (GH-16723) X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d83fc2702951f56a7339aa95d62414ed6e0fb40d;p=python bpo-38453: Resolve test directories before chdir to them (GH-16723) --- diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py index d593fc18d9..0f294c5b0f 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