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

Method test_link_dir_fd

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

Source from the content-addressed store, hash-verified

1699 "test needs dir_fd support in os.link()"
1700 )
1701 def test_link_dir_fd(self):
1702 with self.prepare_file() as (dir_fd, name, fullname), \
1703 self.prepare() as (dir_fd2, linkname, fulllinkname):
1704 try:
1705 posix.link(name, linkname, src_dir_fd=dir_fd, dst_dir_fd=dir_fd2)
1706 except PermissionError as e:
1707 self.skipTest('posix.link(): %s' % e)
1708 self.addCleanup(posix.unlink, fulllinkname)
1709 # should have same inodes
1710 self.assertEqual(posix.stat(fullname)[1],
1711 posix.stat(fulllinkname)[1])
1712
1713 @unittest.skipUnless(os.mkdir in os.supports_dir_fd, "test needs dir_fd support in os.mkdir()")
1714 def test_mkdir_dir_fd(self):

Callers

nothing calls this directly

Calls 6

prepare_fileMethod · 0.95
prepareMethod · 0.95
skipTestMethod · 0.80
addCleanupMethod · 0.80
assertEqualMethod · 0.45
statMethod · 0.45

Tested by

no test coverage detected