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

Function test_default_mode_skips_fchmod

tests/test_default_mode.py:74–82  ·  view source on GitHub ↗
(tmp_path: Path, mocker: MagicMock)

Source from the content-addressed store, hash-verified

72
73@pytest.mark.skipif(sys.platform == "win32", reason="fchmod only on Unix")
74def test_default_mode_skips_fchmod(tmp_path: Path, mocker: MagicMock) -> None:
75 lock_path = tmp_path / "a.lock"
76 lock = FileLock(str(lock_path))
77
78 fchmod_spy = mocker.patch("os.fchmod")
79 lock.acquire()
80 assert lock.is_locked
81 fchmod_spy.assert_not_called()
82 lock.release()
83
84
85@pytest.mark.skipif(sys.platform == "win32", reason="fchmod only on Unix")

Callers

nothing calls this directly

Calls 2

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…