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:118–126  ·  view source on GitHub ↗
(lock_file: str)

Source from the content-addressed store, hash-verified

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

Used in the wild real call sites across dependent graphs

searching dependent graphs…