From 3abd857671f3182bfec9513965bf79089fc99d81 Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Mon, 14 Oct 2019 08:42:21 -0700 Subject: [PATCH] bpo-38453: Resolve test directories before chdir to them (GH-16723) (cherry picked from commit d83fc2702951f56a7339aa95d62414ed6e0fb40d) Co-authored-by: Steve Dower --- 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 2ff7640535e9555..d6a7819cb01398e 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