(self)
| 3531 | os_helper.rmtree(self.base) |
| 3532 | |
| 3533 | def test_walk_bad_dir(self): |
| 3534 | errors = [] |
| 3535 | walk_it = self.walk_path.walk(on_error=errors.append) |
| 3536 | root, dirs, files = next(walk_it) |
| 3537 | self.assertEqual(errors, []) |
| 3538 | dir1 = 'SUB1' |
| 3539 | path1 = root / dir1 |
| 3540 | path1new = (root / dir1).with_suffix(".new") |
| 3541 | path1.rename(path1new) |
| 3542 | try: |
| 3543 | roots = [r for r, _, _ in walk_it] |
| 3544 | self.assertTrue(errors) |
| 3545 | self.assertNotIn(path1, roots) |
| 3546 | self.assertNotIn(path1new, roots) |
| 3547 | for dir2 in dirs: |
| 3548 | if dir2 != dir1: |
| 3549 | self.assertIn(root / dir2, roots) |
| 3550 | finally: |
| 3551 | path1new.rename(path1) |
| 3552 | |
| 3553 | def test_walk_many_open_files(self): |
| 3554 | depth = 30 |
nothing calls this directly
no test coverage detected