(lock_file: str, mode: Literal["read", "write"])
| 65 | @pytest.mark.parametrize("mode", [pytest.param("read", id="read"), pytest.param("write", id="write")]) |
| 66 | @pytest.mark.asyncio |
| 67 | async def test_acquire_release(lock_file: str, mode: Literal["read", "write"]) -> None: |
| 68 | lock = AsyncReadWriteLock(lock_file, is_singleton=False) |
| 69 | proxy = await getattr(lock, f"acquire_{mode}")() |
| 70 | async with proxy as held: |
| 71 | assert held is lock |
| 72 | with pytest.raises(RuntimeError, match="not held"): |
| 73 | await lock.release() |
| 74 | await lock.close() |
| 75 | |
| 76 | |
| 77 | @pytest.mark.parametrize("mode", [pytest.param("read", id="read"), pytest.param("write", id="write")]) |
nothing calls this directly
no test coverage detected