feat(advisor-comparison): add build_advisor_comparison diagnosis diffing
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -553,8 +553,10 @@ class TestBuildAdvisorComparison:
|
||||
tmp_path, "r1", "scn-a", "2026-01-01T00:00:00+00:00", "gpt-5",
|
||||
[{"sample_id": "s1", "faithfulness": 0.5}],
|
||||
)
|
||||
# Corrupt the previous run's scores.csv after it was written.
|
||||
(previous_dir / "scores.csv").write_text("not,a,valid\ncsv,,,", encoding="utf-8")
|
||||
# Corrupt the previous run's scores.csv with invalid-encoding bytes so
|
||||
# pd.read_csv raises UnicodeDecodeError (a ValueError subclass caught
|
||||
# by run_reader.read_scores_frame, which then returns an empty frame).
|
||||
(previous_dir / "scores.csv").write_bytes(b"\xff\xfe\x00\x01broken binary data \x00\x00")
|
||||
|
||||
current_dir = _write_fake_run(
|
||||
tmp_path, "r2", "scn-a", "2026-01-02T00:00:00+00:00", "gpt-5",
|
||||
|
||||
Reference in New Issue
Block a user