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

Function capture

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

Source from the content-addressed store, hash-verified

131 real_close = os.close
132
133 def capture(fd: int) -> None:
134 nonlocal locked_fd
135 locked_fd = fd
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.

Callers 2

failFunction · 0.85
failFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected