Name the missing-table state for the backstop

Still the backstop's business, but a clean message beats a bare
FileNotFoundError for the one impossible state most likely to appear
in a report.
This commit is contained in:
J. Nick Koston
2026-08-23 16:11:32 -05:00
parent b8f736ac86
commit 5447239258
2 changed files with 17 additions and 1 deletions
+13
View File
@@ -305,3 +305,16 @@ def test_print_summary_corrupt_size_json_warns(
print_summary(size_json, None)
assert capsys.readouterr().out == ""
assert "Skipping size summary" in caplog.text
def test_print_summary_missing_partitions_named_in_backstop(
tmp_path: Path,
capsys: pytest.CaptureFixture[str],
caplog: pytest.LogCaptureFixture,
) -> None:
"""A vanished table is an impossible post-build state; the backstop
reports it by name instead of a bare FileNotFoundError."""
size_json = _write_size_json(tmp_path, _dram_size_data())
print_summary(size_json, tmp_path / "nope.csv")
assert "Flash:" not in capsys.readouterr().out
assert "partitions.csv not found" in caplog.text