(lock_file: str)
| 232 | |
| 233 | @pytest.mark.asyncio |
| 234 | async def test_sequential_mode_switch(lock_file: str) -> None: |
| 235 | lock = AsyncReadWriteLock(lock_file, is_singleton=False) |
| 236 | async with lock.read_lock(): |
| 237 | assert not await asyncio.to_thread(writer_gets_in, lock_file) |
| 238 | async with lock.write_lock(): |
| 239 | assert not await asyncio.to_thread(writer_gets_in, lock_file) |
| 240 | async with lock.read_lock(): |
| 241 | assert not await asyncio.to_thread(writer_gets_in, lock_file) |
| 242 | await lock.close() |
| 243 | assert writer_gets_in(lock_file) |
nothing calls this directly
no test coverage detected