MCPcopy Create free account
hub / github.com/tox-dev/filelock / test_custom_executor

Function test_custom_executor

tests/test_async_read_write.py:214–220  ·  view source on GitHub ↗
(lock_file: str)

Source from the content-addressed store, hash-verified

212
213@pytest.mark.asyncio
214async def test_custom_executor(lock_file: str) -> None:
215 executor = ThreadPoolExecutor(max_workers=1)
216 lock = AsyncReadWriteLock(lock_file, is_singleton=False, executor=executor)
217 async with lock.read_lock():
218 assert lock._lock._current_mode == "read"
219 assert lock._lock._lock_level == 0
220 executor.shutdown(wait=False)
221
222
223@pytest.mark.asyncio

Callers

nothing calls this directly

Calls 2

read_lockMethod · 0.95
AsyncReadWriteLockClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…