(self)
| 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): |
no test coverage detected