(self)
| 1852 | os.rename(path1new, path1) |
| 1853 | |
| 1854 | def test_walk_bad_dir2(self): |
| 1855 | walk_it = self.walk('nonexisting') |
| 1856 | if self.is_fwalk: |
| 1857 | self.assertRaises(FileNotFoundError, next, walk_it) |
| 1858 | self.assertRaises(StopIteration, next, walk_it) |
| 1859 | |
| 1860 | walk_it = self.walk('nonexisting', follow_symlinks=True) |
| 1861 | if self.is_fwalk: |
| 1862 | self.assertRaises(FileNotFoundError, next, walk_it) |
| 1863 | self.assertRaises(StopIteration, next, walk_it) |
| 1864 | |
| 1865 | walk_it = self.walk(self.tmp1_path) |
| 1866 | self.assertRaises(StopIteration, next, walk_it) |
| 1867 | |
| 1868 | walk_it = self.walk(self.tmp1_path, follow_symlinks=True) |
| 1869 | if self.is_fwalk: |
| 1870 | self.assertRaises(NotADirectoryError, next, walk_it) |
| 1871 | self.assertRaises(StopIteration, next, walk_it) |
| 1872 | |
| 1873 | @unittest.skipUnless(hasattr(os, "mkfifo"), 'requires os.mkfifo()') |
| 1874 | @unittest.skipIf(sys.platform == "vxworks", |
nothing calls this directly
no test coverage detected