tools: dist export no longer cuts the dist export record out of the shipped tools/CONTRACT.md (#121)
Files changed: - CHANGES.md - VERSION - tools/CONTRACT.md - tools/chemenu/commands/dist_cmd.py - tools/chemenu/tests/test_docs_verify.py
This commit is contained in:
1 parent
5ffab3accf
commit
2a60f3a265
5 files changed
+28
-4
No files matched your search
@@ -107,6 +107,18 @@ def test_the_real_commands_region_is_current():
|
||||
assert docs_verify.check_commands_region() == []
|
||||
|
||||
|
||||
def test_the_commands_region_survives_dist_export_unchanged():
|
||||
"""`dist export` removes `dist:strip` marker spans from shipped files, so a
|
||||
record whose prose quotes the literal marker pair gets cut in the
|
||||
exported `tools/CONTRACT.md` - and the fresh instance's own `docs verify`
|
||||
then reports its generated region stale. That is what failed CI's
|
||||
fresh-instance step the first time this region shipped; this pins it
|
||||
without needing the full replay."""
|
||||
plan = dist_cmd.build_plan()
|
||||
shipped = plan["tools/CONTRACT.md"].content
|
||||
assert shipped == (config.ROOT / "tools" / "CONTRACT.md").read_text(encoding="utf-8")
|
||||
|
||||
|
||||
def test_every_registered_commands_flags_are_documented():
|
||||
"""Forward direction against the real tree and the real Click app: every
|
||||
non-hidden flag of every command must appear in its cli_contract
|
||||
|
||||
Reference in new issue
Block a user