]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-38453: Resolve test directories before chdir to them (GH-16723)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 14 Oct 2019 16:01:29 +0000 (09:01 -0700)
committerGitHub <noreply@github.com>
Mon, 14 Oct 2019 16:01:29 +0000 (09:01 -0700)
(cherry picked from commit d83fc2702951f56a7339aa95d62414ed6e0fb40d)

Co-authored-by: Steve Dower <steve.dower@python.org>
Lib/test/support/__init__.py

index 2ff7640535e9555df9870121a8ba7da62e9f72e9..d6a7819cb01398eac961bf5abe6251fc7df19499 100644 (file)
@@ -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