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

Method test_listdir_scandir

Lib/test/test_posix.py:2356–2368  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2354
2355
2356 def test_listdir_scandir(self):
2357 self._verify_available("HAVE_FDOPENDIR")
2358 if self.mac_ver >= (10, 10):
2359 self.assertIn("HAVE_FDOPENDIR", posix._have_functions)
2360
2361 else:
2362 self.assertNotIn("HAVE_FDOPENDIR", posix._have_functions)
2363
2364 with self.assertRaisesRegex(TypeError, "listdir: path should be string, bytes, os.PathLike or None, not int"):
2365 os.listdir(0)
2366
2367 with self.assertRaisesRegex(TypeError, "scandir: path should be string, bytes, os.PathLike or None, not int"):
2368 os.scandir(0)
2369
2370 def test_mkdir(self):
2371 self._verify_available("HAVE_MKDIRAT")

Callers

nothing calls this directly

Calls 6

_verify_availableMethod · 0.95
assertInMethod · 0.80
assertNotInMethod · 0.80
assertRaisesRegexMethod · 0.80
listdirMethod · 0.80
scandirMethod · 0.45

Tested by

no test coverage detected