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

Function test_acquire_release_read

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

Source from the content-addressed store, hash-verified

35
36@pytest.mark.asyncio
37async def test_acquire_release_read(lock_file: str) -> None:
38 lock = AsyncReadWriteLock(lock_file, is_singleton=False)
39 proxy = await lock.acquire_read()
40 assert lock._lock._lock_level == 1
41 assert lock._lock._current_mode == "read"
42 await lock.release()
43 assert lock._lock._lock_level == 0
44 assert lock._lock._current_mode is None
45 assert isinstance(proxy, object)
46
47
48@pytest.mark.asyncio

Callers

nothing calls this directly

Calls 3

acquire_readMethod · 0.95
releaseMethod · 0.95
AsyncReadWriteLockClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…