(self)
| 1775 | |
| 1776 | @unittest.skipUnless(os.unlink in os.supports_dir_fd, "test needs dir_fd support in os.unlink()") |
| 1777 | def test_unlink_dir_fd(self): |
| 1778 | with self.prepare() as (dir_fd, name, fullname): |
| 1779 | os_helper.create_empty_file(fullname) |
| 1780 | posix.stat(fullname) # should not raise exception |
| 1781 | try: |
| 1782 | posix.unlink(name, dir_fd=dir_fd) |
| 1783 | self.assertRaises(OSError, posix.stat, fullname) |
| 1784 | except: |
| 1785 | self.addCleanup(posix.unlink, fullname) |
| 1786 | raise |
| 1787 | |
| 1788 | @unittest.skipUnless(hasattr(os, 'mkfifo') and os.mkfifo in os.supports_dir_fd, "test needs dir_fd support in os.mkfifo()") |
| 1789 | def test_mkfifo_dir_fd(self): |
nothing calls this directly
no test coverage detected