(lock_file: str)
| 183 | |
| 184 | @pytest.mark.asyncio |
| 185 | async def test_custom_executor(lock_file: str) -> None: |
| 186 | executor = ThreadPoolExecutor(max_workers=1) |
| 187 | lock = AsyncReadWriteLock(lock_file, is_singleton=False, executor=executor) |
| 188 | async with lock.read_lock(): |
| 189 | assert_mode_held(lock_file, "read") |
| 190 | with pytest.raises(RuntimeError, match="not held"): |
| 191 | await lock.release() |
| 192 | executor.shutdown(wait=False) |
| 193 | |
| 194 | |
| 195 | @pytest.mark.asyncio |
nothing calls this directly
no test coverage detected