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

Function test_non_blocking_write

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

Source from the content-addressed store, hash-verified

134
135@pytest.mark.asyncio
136async def test_non_blocking_write(lock_file: str) -> None:
137 holder = ReadWriteLock(lock_file, is_singleton=False)
138 holder.acquire_read()
139 try:
140 lock = AsyncReadWriteLock(lock_file, is_singleton=False)
141 with pytest.raises(Timeout):
142 await lock.acquire_write(blocking=False)
143 finally:
144 holder.release()
145
146
147@pytest.mark.asyncio

Callers

nothing calls this directly

Calls 5

acquire_readMethod · 0.95
acquire_writeMethod · 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…