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

Function test_timeout_expires

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

Source from the content-addressed store, hash-verified

111
112@pytest.mark.asyncio
113async def test_timeout_expires(lock_file: str) -> None:
114 holder = ReadWriteLock(lock_file, is_singleton=False)
115 holder.acquire_write()
116 try:
117 lock = AsyncReadWriteLock(lock_file, is_singleton=False)
118 with pytest.raises(Timeout):
119 await lock.acquire_read(timeout=0.2)
120 await lock.close()
121 finally:
122 holder.release()
123
124
125@pytest.mark.asyncio

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected