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

Function test_acquire_release_write

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

Source from the content-addressed store, hash-verified

47
48@pytest.mark.asyncio
49async def test_acquire_release_write(lock_file: str) -> None:
50 lock = AsyncReadWriteLock(lock_file, is_singleton=False)
51 await lock.acquire_write()
52 assert lock._lock._lock_level == 1
53 assert lock._lock._current_mode == "write"
54 await lock.release()
55 assert lock._lock._lock_level == 0
56 assert lock._lock._current_mode is None
57
58
59@pytest.mark.asyncio

Callers

nothing calls this directly

Calls 3

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