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

Method test_rename_replace

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

Source from the content-addressed store, hash-verified

2401 os.mknod("path", dir_fd=0)
2402
2403 def test_rename_replace(self):
2404 self._verify_available("HAVE_RENAMEAT")
2405 if self.mac_ver >= (10, 10):
2406 self.assertIn("HAVE_RENAMEAT", posix._have_functions)
2407
2408 else:
2409 self.assertNotIn("HAVE_RENAMEAT", posix._have_functions)
2410
2411 with self.assertRaisesRegex(NotImplementedError, "src_dir_fd and dst_dir_fd unavailable"):
2412 os.rename("a", "b", src_dir_fd=0)
2413
2414 with self.assertRaisesRegex(NotImplementedError, "src_dir_fd and dst_dir_fd unavailable"):
2415 os.rename("a", "b", dst_dir_fd=0)
2416
2417 with self.assertRaisesRegex(NotImplementedError, "src_dir_fd and dst_dir_fd unavailable"):
2418 os.replace("a", "b", src_dir_fd=0)
2419
2420 with self.assertRaisesRegex(NotImplementedError, "src_dir_fd and dst_dir_fd unavailable"):
2421 os.replace("a", "b", dst_dir_fd=0)
2422
2423 def test_unlink_rmdir(self):
2424 self._verify_available("HAVE_UNLINKAT")

Callers

nothing calls this directly

Calls 6

_verify_availableMethod · 0.95
assertInMethod · 0.80
assertNotInMethod · 0.80
assertRaisesRegexMethod · 0.80
renameMethod · 0.45
replaceMethod · 0.45

Tested by

no test coverage detected