fix(ratchet): refuse a package directory that does not exist
CI / test (3.11) (pull_request) Successful in 36s
CI / test (3.12) (pull_request) Successful in 32s
CI / test (3.13) (pull_request) Successful in 31s

napalm-hpe-aruba-procurve ships napalm_procurve; guessed from its name, the
ratchet measured nothing and wrote an empty baseline without a word.
This commit is contained in:
christianmanivong committed 2026-10-23 10:28:16 +02:00
1 parent 6f1789f14a
commit eb3a296aff
5 files changed
+33 -1

No files matched your search

+12
View File
@@ -308,3 +308,15 @@ def test_check_fails_on_a_problem_and_on_a_stale_entry(tmp_path: pathlib.Path) -
assert code == 1
assert "pkg/mod.py::long = 62 (new)" in text
assert "stale: function_lines: pkg/mod.py::old" in text
def test_a_package_that_does_not_exist_is_an_error_not_an_empty_baseline(
tmp_path: pathlib.Path,
) -> None:
"""procurve's import package is napalm_procurve: guessed from the name, the
ratchet measured nothing and wrote an empty baseline without a word."""
repo = _repo(tmp_path, LONG)
with pytest.raises(FileNotFoundError, match="napalm_missing"):
qr.run(repo, "napalm_missing", write=True)
assert not (repo / qr.BASELINE).exists()