MCPcopy Create free account
hub / github.com/python/cpython / test_rename_dir_fd

Method test_rename_dir_fd

Lib/test/test_os/test_posix.py:1835–1841  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1833
1834 @unittest.skipUnless(os.rename in os.supports_dir_fd, "test needs dir_fd support in os.rename()")
1835 def test_rename_dir_fd(self):
1836 with self.prepare_file() as (dir_fd, name, fullname), \
1837 self.prepare() as (dir_fd2, name2, fullname2):
1838 posix.rename(name, name2,
1839 src_dir_fd=dir_fd, dst_dir_fd=dir_fd2)
1840 posix.stat(fullname2) # should not raise exception
1841 posix.rename(fullname2, fullname)
1842
1843 @unittest.skipUnless(os.symlink in os.supports_dir_fd, "test needs dir_fd support in os.symlink()")
1844 def test_symlink_dir_fd(self):

Callers

nothing calls this directly

Calls 4

prepare_fileMethod · 0.95
prepareMethod · 0.95
renameMethod · 0.45
statMethod · 0.45

Tested by

no test coverage detected