fix(ratchet): refuse a package directory that does not exist
CI / test (3.11) (pull_request) Successful in 27s
CI / test (3.12) (pull_request) Successful in 24s
CI / test (3.13) (pull_request) Successful in 23s

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 08:49:47 +02:00
1 parent a4858e9a1f
commit c3151d62fa
5 files changed
+33 -1

No files matched your search

+9
View File
@@ -135,3 +135,12 @@ def test_package_prints_the_import_package(
) -> None:
assert cli.main(["package", str(make_repo())]) == 0
assert capsys.readouterr().out == "napalm_example\n"
def test_ratchet_names_the_missing_package(
make_repo: RepoFactory, capsys: pytest.CaptureFixture[str]
) -> None:
repo = make_repo({"napalm_example/__init__.py": None, "napalm_example/py.typed": None})
assert cli.main(["ratchet", "--write", str(repo)]) == 2
assert "[tool.napalm-standard] package" in capsys.readouterr().err