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

Function test_acquire_release_write

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

Source from the content-addressed store, hash-verified

127
128
129def test_acquire_release_write(lock_file: str) -> None:
130 lock = ReadWriteLock(lock_file, is_singleton=False)
131 lock.acquire_write()
132 assert lock._lock_level == 1
133 assert lock._current_mode == "write"
134 assert lock._write_thread_id == threading.get_ident()
135 lock.release()
136 assert lock._lock_level == 0
137 assert lock._current_mode is None
138 assert lock._write_thread_id is None
139
140
141@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 3

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