(self)
| 3275 | "Bad file descriptor in /dev/fd affects only macOS") |
| 3276 | @needs_posix |
| 3277 | def test_handling_bad_descriptor(self): |
| 3278 | try: |
| 3279 | file_descriptors = list(pathlib.Path('/dev/fd').rglob("*"))[3:] |
| 3280 | if not file_descriptors: |
| 3281 | self.skipTest("no file descriptors - issue was not reproduced") |
| 3282 | # Checking all file descriptors because there is no guarantee |
| 3283 | # which one will fail. |
| 3284 | for f in file_descriptors: |
| 3285 | f.exists() |
| 3286 | f.is_dir() |
| 3287 | f.is_file() |
| 3288 | f.is_symlink() |
| 3289 | f.is_block_device() |
| 3290 | f.is_char_device() |
| 3291 | f.is_fifo() |
| 3292 | f.is_socket() |
| 3293 | except OSError as e: |
| 3294 | if e.errno == errno.EBADF: |
| 3295 | self.fail("Bad file descriptor not handled.") |
| 3296 | raise |
| 3297 | |
| 3298 | @needs_posix |
| 3299 | def test_from_uri_posix(self): |
nothing calls this directly
no test coverage detected