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

Method test_readlink_dir_fd

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

Source from the content-addressed store, hash-verified

1826 @unittest.skipUnless(hasattr(os, 'readlink') and (os.readlink in os.supports_dir_fd),
1827 "test needs dir_fd support in os.readlink()")
1828 def test_readlink_dir_fd(self):
1829 with self.prepare() as (dir_fd, name, fullname):
1830 os.symlink('symlink', fullname)
1831 self.addCleanup(posix.unlink, fullname)
1832 self.assertEqual(posix.readlink(name, dir_fd=dir_fd), 'symlink')
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):

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