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

Function close

tests/conftest.py:138–142  ·  view source on GitHub ↗
(fd: int)

Source from the content-addressed store, hash-verified

136 mocker.patch("os.close", side_effect=close, autospec=True)
137
138 def close(fd: int) -> None:
139 # GC finalizers can close unrelated descriptors while the patch is active.
140 if fd == locked_fd:
141 raise release_error
142 real_close(fd) # pragma: no cover # only an unrelated close (e.g. a GC finalizer) reaches here
143
144 yield capture, release_error, release_cause
145 if locked_fd is not None: # pragma: no branch # every consumer calls capture, so this is always set

Callers 1

hold_oplockFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected