[Python-checkins] cpython (merge 3.5 -> default): Issues #23808, #25911: Trying to fix walk tests on Windows.
serhiy.storchaka
python-checkins at python.org
Tue Mar 8 09:13:08 EST 2016
https://hg.python.org/cpython/rev/da020e408c7f
changeset: 100456:da020e408c7f
parent: 100451:60430bdcb426
parent: 100455:f9e22717722d
user: Serhiy Storchaka <storchaka at gmail.com>
date: Tue Mar 08 16:12:46 2016 +0200
summary:
Issues #23808, #25911: Trying to fix walk tests on Windows.
On Windows a symlink can has the FILE_ATTRIBUTE_DIRECTORY flag.
files:
Lib/test/test_os.py | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -836,7 +836,11 @@
if support.can_symlink():
os.symlink(os.path.abspath(t2_path), self.link_path)
os.symlink('broken', broken_link_path, True)
- self.sub2_tree = (sub2_path, ["link"], ["broken_link", "tmp3"])
+ if os.path.isdir(broken_link_path):
+ # On Windows a symlink can has the FILE_ATTRIBUTE_DIRECTORY flag.
+ self.sub2_tree = (sub2_path, ["broken_link", "link"], ["tmp3"])
+ else:
+ self.sub2_tree = (sub2_path, ["link"], ["broken_link", "tmp3"])
else:
self.sub2_tree = (sub2_path, [], ["tmp3"])
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list