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

Function test_timeout_expires

tests/sqlite/test_async.py:148–157  ·  view source on GitHub ↗
(lock_file: str)

Source from the content-addressed store, hash-verified

146
147@pytest.mark.asyncio
148async def test_timeout_expires(lock_file: str) -> None:
149 holder = ReadWriteLock(lock_file, is_singleton=False)
150 holder.acquire_write()
151 try:
152 lock = AsyncReadWriteLock(lock_file, is_singleton=False)
153 with pytest.raises(Timeout):
154 await lock.acquire_read(timeout=0.2)
155 await lock.close()
156 finally:
157 holder.release()
158
159
160@pytest.mark.asyncio

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected