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

Function reenter

tests/core/test_interruption.py:289–290  ·  view source on GitHub ↗
(_canonical: str, *, timeout: float, blocking: bool)

Source from the content-addressed store, hash-verified

287 lock = FileLock(str(tmp_path / "a.lock"))
288
289 def reenter(_canonical: str, *, timeout: float, blocking: bool) -> None:
290 lock.acquire(timeout=timeout, blocking=blocking)
291
292 mocker.patch.object(lock, "_raise_if_would_deadlock", side_effect=reenter, autospec=True)
293 with pytest.raises(RuntimeError, match="acquired again while this thread's acquire of it waits"):

Callers

nothing calls this directly

Calls 1

acquireMethod · 0.45

Tested by

no test coverage detected