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

Function test_acquire_release_read

tests/test_read_write_unit.py:119–127  ·  view source on GitHub ↗
(lock_file: str)

Source from the content-addressed store, hash-verified

117
118
119def test_acquire_release_read(lock_file: str) -> None:
120 lock = ReadWriteLock(lock_file, is_singleton=False)
121 proxy = lock.acquire_read()
122 assert lock._lock_level == 1
123 assert lock._current_mode == "read"
124 lock.release()
125 assert lock._lock_level == 0
126 assert lock._current_mode is None
127 assert isinstance(proxy, object)
128
129
130def test_acquire_release_write(lock_file: str) -> None:

Callers

nothing calls this directly

Calls 3

acquire_readMethod · 0.95
releaseMethod · 0.95
ReadWriteLockClass · 0.90

Tested by

no test coverage detected