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

Method prepare_file

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

Source from the content-addressed store, hash-verified

1606
1607 @contextmanager
1608 def prepare_file(self):
1609 with self.prepare() as (dir_fd, name, fullname):
1610 os_helper.create_empty_file(fullname)
1611 self.addCleanup(posix.unlink, fullname)
1612 yield (dir_fd, name, fullname)
1613
1614 @unittest.skipUnless(os.access in os.supports_dir_fd, "test needs dir_fd support for os.access()")
1615 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