(fd: int)
| 150 | fd_to_fail = lock._context.lock_file_fd # _release() nulls this before closing, so read it now |
| 151 | |
| 152 | def _close_eio(fd: int) -> None: |
| 153 | real_close(fd) |
| 154 | if fd == fd_to_fail: # pragma: no branch # only the lock's own descriptor closes while the patch is live |
| 155 | raise OSError(EIO, "Input/output error") |
| 156 | |
| 157 | mocker.patch("filelock._unix.os.close", side_effect=_close_eio) |
| 158 | lock.release() |
nothing calls this directly
no outgoing calls
no test coverage detected