(lock_file: str)
| 76 | |
| 77 | @pytest.mark.asyncio |
| 78 | async def test_custom_executor(lock_file: str) -> None: |
| 79 | executor = ThreadPoolExecutor(max_workers=1) |
| 80 | lock = AsyncReadWriteLock(lock_file, is_singleton=False, executor=executor) |
| 81 | async with lock.read_lock(): |
| 82 | assert_mode_held(lock_file, "read") |
| 83 | with pytest.raises(RuntimeError, match="not held"): |
| 84 | await lock.release() |
| 85 | executor.shutdown(wait=False) |
| 86 | |
| 87 | |
| 88 | @pytest.mark.asyncio |
nothing calls this directly
no test coverage detected