(tmp_path: Path, mocker: MagicMock)
| 72 | |
| 73 | @pytest.mark.skipif(sys.platform == "win32", reason="fchmod only on Unix") |
| 74 | def 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") |