[Python-checkins] bpo-38453: Resolve test directories before chdir to them (GH-16723)
Steve Dower
webhook-mailer at python.org
Mon Oct 14 11:42:26 EDT 2019
https://github.com/python/cpython/commit/d83fc2702951f56a7339aa95d62414ed6e0fb40d
commit: d83fc2702951f56a7339aa95d62414ed6e0fb40d
branch: master
author: Steve Dower <steve.dower at python.org>
committer: GitHub <noreply at github.com>
date: 2019-10-14T08:42:21-07:00
summary:
bpo-38453: Resolve test directories before chdir to them (GH-16723)
files:
M Lib/test/support/__init__.py
diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py
index d593fc18d96e1..0f294c5b0f456 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
More information about the Python-checkins
mailing list