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

Method prepare

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

Source from the content-addressed store, hash-verified

1594
1595 @contextmanager
1596 def prepare(self):
1597 TestPosixDirFd.count += 1
1598 name = f'{os_helper.TESTFN}_{self.count}'
1599 base_dir = f'{os_helper.TESTFN}_{self.count}base'
1600 posix.mkdir(base_dir)
1601 self.addCleanup(posix.rmdir, base_dir)
1602 fullname = os.path.join(base_dir, name)
1603 assert not os.path.exists(fullname)
1604 with os_helper.open_dir_fd(base_dir) as dir_fd:
1605 yield (dir_fd, name, fullname)
1606
1607 @contextmanager
1608 def prepare_file(self):

Callers 13

prepare_fileMethod · 0.95
test_stat_dir_fdMethod · 0.95
test_link_dir_fdMethod · 0.95
test_mkdir_dir_fdMethod · 0.95
test_mknod_dir_fdMethod · 0.95
test_open_dir_fdMethod · 0.95
test_readlink_dir_fdMethod · 0.95
test_rename_dir_fdMethod · 0.95
test_symlink_dir_fdMethod · 0.95
test_unlink_dir_fdMethod · 0.95
test_mkfifo_dir_fdMethod · 0.95

Calls 4

addCleanupMethod · 0.80
mkdirMethod · 0.45
joinMethod · 0.45
existsMethod · 0.45

Tested by

no test coverage detected