(
lock_file: str, mode: Literal["read", "write"], held: Literal["read", "write"]
)
| 131 | ) |
| 132 | @pytest.mark.asyncio |
| 133 | async def test_non_blocking_conflict( |
| 134 | lock_file: str, mode: Literal["read", "write"], held: Literal["read", "write"] |
| 135 | ) -> None: |
| 136 | holder = ReadWriteLock(lock_file, is_singleton=False) |
| 137 | getattr(holder, f"acquire_{held}")() |
| 138 | try: |
| 139 | lock = AsyncReadWriteLock(lock_file, is_singleton=False) |
| 140 | with pytest.raises(Timeout): |
| 141 | await getattr(lock, f"acquire_{mode}")(blocking=False) |
| 142 | await lock.close() |
| 143 | finally: |
| 144 | holder.release() |
| 145 | |
| 146 | |
| 147 | @pytest.mark.asyncio |
nothing calls this directly
no test coverage detected