MCPcopy Index your code
hub / github.com/python/cpython / prepare_file

Method prepare_file

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

Source from the content-addressed store, hash-verified

1666
1667 @contextmanager
1668 def prepare_file(self):
1669 with self.prepare() as (dir_fd, name, fullname):
1670 os_helper.create_empty_file(fullname)
1671 self.addCleanup(posix.unlink, fullname)
1672 yield (dir_fd, name, fullname)
1673
1674 @unittest.skipUnless(os.access in os.supports_dir_fd, "test needs dir_fd support for os.access()")
1675 def test_access_dir_fd(self):

Callers 6

test_access_dir_fdMethod · 0.95
test_chmod_dir_fdMethod · 0.95
test_chown_dir_fdMethod · 0.95
test_utime_dir_fdMethod · 0.95
test_link_dir_fdMethod · 0.95
test_rename_dir_fdMethod · 0.95

Calls 2

prepareMethod · 0.95
addCleanupMethod · 0.80

Tested by

no test coverage detected