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

Function test_non_blocking_read

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

Source from the content-addressed store, hash-verified

122
123@pytest.mark.asyncio
124async def test_non_blocking_read(lock_file: str) -> None:
125 holder = ReadWriteLock(lock_file, is_singleton=False)
126 holder.acquire_write()
127 try:
128 lock = AsyncReadWriteLock(lock_file, is_singleton=False)
129 with pytest.raises(Timeout):
130 await lock.acquire_read(blocking=False)
131 finally:
132 holder.release()
133
134
135@pytest.mark.asyncio

Callers

nothing calls this directly

Calls 5

acquire_writeMethod · 0.95
acquire_readMethod · 0.95
releaseMethod · 0.95
ReadWriteLockClass · 0.90
AsyncReadWriteLockClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…