MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_walk_bad_dir2

Method test_walk_bad_dir2

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

Source from the content-addressed store, hash-verified

1647 os.rename(path1new, path1)
1648
1649 def test_walk_bad_dir2(self):
1650 walk_it = self.walk('nonexisting')
1651 if self.is_fwalk:
1652 self.assertRaises(FileNotFoundError, next, walk_it)
1653 self.assertRaises(StopIteration, next, walk_it)
1654
1655 walk_it = self.walk('nonexisting', follow_symlinks=True)
1656 if self.is_fwalk:
1657 self.assertRaises(FileNotFoundError, next, walk_it)
1658 self.assertRaises(StopIteration, next, walk_it)
1659
1660 walk_it = self.walk(self.tmp1_path)
1661 self.assertRaises(StopIteration, next, walk_it)
1662
1663 walk_it = self.walk(self.tmp1_path, follow_symlinks=True)
1664 if self.is_fwalk:
1665 self.assertRaises(NotADirectoryError, next, walk_it)
1666 self.assertRaises(StopIteration, next, walk_it)
1667
1668 @unittest.skipUnless(hasattr(os, "mkfifo"), 'requires os.mkfifo()')
1669 @unittest.skipIf(sys.platform == "vxworks",

Callers

nothing calls this directly

Calls 2

walkMethod · 0.95
assertRaisesMethod · 0.45

Tested by

no test coverage detected