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

Function refuse_write

tests/native/test_unix_probe.py:197–199  ·  view source on GitHub ↗
(_fd: int, _data: bytes)

Source from the content-addressed store, hash-verified

195 replacement.write_text("other record", encoding="utf-8")
196
197 def refuse_write(_fd: int, _data: bytes) -> int:
198 replacement.replace(lock_path)
199 raise OSError(EIO, "write failed")
200
201 mocker.patch("os.write", autospec=True, side_effect=refuse_write)
202 with pytest.raises(OSError, match="write failed"):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected