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

Function test_fallback_emits_warning

tests/test_unix_fallback.py:25–31  ·  view source on GitHub ↗
(tmp_path: Path, mocker: MockerFixture)

Source from the content-addressed store, hash-verified

23
24@unix_only
25def test_fallback_emits_warning(tmp_path: Path, mocker: MockerFixture) -> None:
26 mocker.patch(_FLOCK_PATCH_TARGET, side_effect=_ENOSYS_SIDE_EFFECT)
27 lock = UnixFileLock(tmp_path / "test.lock")
28
29 with pytest.warns(UserWarning, match="flock not supported on this filesystem, falling back to SoftFileLock"):
30 lock.acquire()
31 lock.release()
32
33
34@unix_only

Callers

nothing calls this directly

Calls 3

UnixFileLockClass · 0.90
acquireMethod · 0.45
releaseMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…