cpython: 19a3e0e664af (original) (raw)
Mercurial > cpython
changeset 100454:19a3e0e664af 3.4
Issues #23808, #25911: Trying to fix walk tests on Windows. On Windows a symlink can has the FILE_ATTRIBUTE_DIRECTORY flag. [#23808]
Serhiy Storchaka storchaka@gmail.com | |
---|---|
date | Tue, 08 Mar 2016 16:11:26 +0200 |
parents | 0cae6b6e3d7d |
children | f9e22717722d 5ceaf06bbf13 |
files | Lib/test/test_os.py |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-)[+] [-] Lib/test/test_os.py 6 |
line wrap: on
line diff
--- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -770,7 +770,11 @@ class WalkTests(unittest.TestCase): 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"])[](#l1.7)
if os.path.isdir(broken_link_path):[](#l1.8)
# On Windows a symlink can has the FILE_ATTRIBUTE_DIRECTORY flag.[](#l1.9)
self.sub2_tree = (sub2_path, ["broken_link", "link"], ["tmp3"])[](#l1.10)
else:[](#l1.11)
self.sub2_tree = (sub2_path, ["link"], ["broken_link", "tmp3"])[](#l1.12) else:[](#l1.13) self.sub2_tree = (sub2_path, [], ["tmp3"])[](#l1.14)