(_fd: int, _data: bytes)
| 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"): |
nothing calls this directly
no outgoing calls
no test coverage detected