MCPcopy Create free account
hub / github.com/tox-dev/filelock / _close_eio

Function _close_eio

tests/test_unix_fallback.py:152–155  ·  view source on GitHub ↗
(fd: int)

Source from the content-addressed store, hash-verified

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()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected