cpython: 470224ec16b6 (original) (raw)

--- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -869,13 +869,23 @@ class WalkTests(unittest.TestCase): os.symlink('broken', broken_link_path, True) os.symlink(join('tmp3', 'broken'), broken_link2_path, True) os.symlink(join('SUB21', 'tmp5'), broken_link3_path, True)

os.chmod(self.sub21_path, 0)

def test_walk_topdown(self): # Walk top-down. @@ -888,6 +898,7 @@ class WalkTests(unittest.TestCase): flipped = all[0][1][0] != "SUB1" all[0][1].sort() all[3 - 2 * flipped][-1].sort()

@@ -908,6 +919,7 @@ class WalkTests(unittest.TestCase): (self.walk_path, ["SUB2"], ["tmp1"])) all[1][-1].sort()

def test_walk_bottom_up(self): @@ -921,6 +933,7 @@ class WalkTests(unittest.TestCase): flipped = all[3][1][0] != "SUB1" all[3][1].sort() all[2 - 2 * flipped][-1].sort()

@@ -949,7 +962,8 @@ class WalkTests(unittest.TestCase): # Windows, which doesn't have a recursive delete command. The # (not so) subtlety is that rmdir will fail unless the dir's # kids are removed first, so bottom up is essential.

@@ -1045,7 +1059,8 @@ class FwalkTests(WalkTests): def tearDown(self): # cleanup