(self)
| 1752 | del self.sub2_tree[1][:1] |
| 1753 | |
| 1754 | def test_walk_topdown(self): |
| 1755 | # Walk top-down. |
| 1756 | all = list(self.walk(self.walk_path)) |
| 1757 | |
| 1758 | self.assertEqual(len(all), 4) |
| 1759 | # We can't know which order SUB1 and SUB2 will appear in. |
| 1760 | # Not flipped: TESTFN, SUB1, SUB11, SUB2 |
| 1761 | # flipped: TESTFN, SUB2, SUB1, SUB11 |
| 1762 | flipped = all[0][1][0] != "SUB1" |
| 1763 | all[0][1].sort() |
| 1764 | all[3 - 2 * flipped][-1].sort() |
| 1765 | all[3 - 2 * flipped][1].sort() |
| 1766 | self.assertEqual(all[0], (self.walk_path, ["SUB1", "SUB2"], ["tmp1"])) |
| 1767 | self.assertEqual(all[1 + flipped], (self.sub1_path, ["SUB11"], ["tmp2"])) |
| 1768 | self.assertEqual(all[2 + flipped], (self.sub11_path, [], [])) |
| 1769 | self.assertEqual(all[3 - 2 * flipped], self.sub2_tree) |
| 1770 | |
| 1771 | def test_walk_prune(self, walk_path=None): |
| 1772 | if walk_path is None: |
nothing calls this directly
no test coverage detected