(_canonical: str, *, timeout: float, blocking: bool)
| 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"): |