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

Function test_soft_errors

tests/test_filelock.py:608–611  ·  view source on GitHub ↗
(tmp_path: Path, mocker: MockerFixture)

Source from the content-addressed store, hash-verified

606
607
608def test_soft_errors(tmp_path: Path, mocker: MockerFixture) -> None:
609 mocker.patch("os.open", side_effect=OSError(ENOSYS, "mock error"))
610 with pytest.raises(OSError, match="mock error"):
611 SoftFileLock(tmp_path / "a.lock").acquire()
612
613
614def _check_file_read_write(txt_file: Path) -> None:

Callers

nothing calls this directly

Calls 2

SoftFileLockClass · 0.90
acquireMethod · 0.45

Tested by

no test coverage detected