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

Method test_readlink_dir_fd

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

Source from the content-addressed store, hash-verified

1752 @unittest.skipUnless(hasattr(os, 'readlink') and (os.readlink in os.supports_dir_fd),
1753 "test needs dir_fd support in os.readlink()")
1754 def test_readlink_dir_fd(self):
1755 with self.prepare() as (dir_fd, name, fullname):
1756 os.symlink('symlink', fullname)
1757 self.addCleanup(posix.unlink, fullname)
1758 self.assertEqual(posix.readlink(name, dir_fd=dir_fd), 'symlink')
1759
1760 @unittest.skipUnless(os.rename in os.supports_dir_fd, "test needs dir_fd support in os.rename()")
1761 def test_rename_dir_fd(self):

Callers

nothing calls this directly

Calls 4

prepareMethod · 0.95
addCleanupMethod · 0.80
assertEqualMethod · 0.45
readlinkMethod · 0.45

Tested by

no test coverage detected