mirror of
https://github.com/esphome/esphome.git
synced 2026-09-30 00:10:22 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user