(
lock_file: str,
held: Literal["read", "write"],
requested: Literal["read", "write"],
match: str,
)
| 109 | ) |
| 110 | @pytest.mark.asyncio |
| 111 | async def test_mode_change_prohibited( |
| 112 | lock_file: str, |
| 113 | held: Literal["read", "write"], |
| 114 | requested: Literal["read", "write"], |
| 115 | match: str, |
| 116 | ) -> None: |
| 117 | lock = AsyncReadWriteLock(lock_file, is_singleton=False) |
| 118 | await getattr(lock, f"acquire_{held}")() |
| 119 | with pytest.raises(RuntimeError, match=match): |
| 120 | await getattr(lock, f"acquire_{requested}")() |
| 121 | await lock.release() |
| 122 | await lock.close() |
| 123 | |
| 124 | |
| 125 | @pytest.mark.parametrize( |
nothing calls this directly
no test coverage detected