(self)
| 1849 | |
| 1850 | @unittest.skipUnless(os.unlink in os.supports_dir_fd, "test needs dir_fd support in os.unlink()") |
| 1851 | def test_unlink_dir_fd(self): |
| 1852 | with self.prepare() as (dir_fd, name, fullname): |
| 1853 | os_helper.create_empty_file(fullname) |
| 1854 | posix.stat(fullname) # should not raise exception |
| 1855 | try: |
| 1856 | posix.unlink(name, dir_fd=dir_fd) |
| 1857 | self.assertRaises(OSError, posix.stat, fullname) |
| 1858 | except: |
| 1859 | self.addCleanup(posix.unlink, fullname) |
| 1860 | raise |
| 1861 | |
| 1862 | @unittest.skipUnless(hasattr(os, 'mkfifo') and os.mkfifo in os.supports_dir_fd, "test needs dir_fd support in os.mkfifo()") |
| 1863 | def test_mkfifo_dir_fd(self): |
nothing calls this directly
no test coverage detected