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

Function test_nested_forced_release

tests/core/test_lock.py:221–232  ·  view source on GitHub ↗
(lock_type: type[BaseFileLock], tmp_path: Path)

Source from the content-addressed store, hash-verified

219
220@pytest.mark.parametrize("lock_type", [FileLock, SoftFileLock])
221def test_nested_forced_release(lock_type: type[BaseFileLock], tmp_path: Path) -> None:
222 lock = lock_type(str(tmp_path / "a"))
223
224 with lock:
225 assert lock.is_locked
226
227 lock.acquire()
228 assert lock.is_locked
229
230 lock.release(force=True)
231 assert not lock.is_locked
232 assert not lock.is_locked
233
234
235@pytest.mark.parametrize("lock_type", [FileLock, SoftFileLock])

Callers

nothing calls this directly

Calls 3

lock_typeFunction · 0.85
acquireMethod · 0.45
releaseMethod · 0.45

Tested by

no test coverage detected