MCPcopy Index your code
hub / github.com/python/cpython / test_walk_bad_dir2

Method test_walk_bad_dir2

Lib/test/test_os/test_os.py:1854–1871  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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",

Callers

nothing calls this directly

Calls 2

walkMethod · 0.95
assertRaisesMethod · 0.45

Tested by

no test coverage detected