test: docs contract merged-stream test pins its own ON FAILURE line (#146)
The comparison against render_failure_hint() alone passed unchanged if the
record lost its exit-1 cause, since both sides fell back to the same see: line.
CHANGES prose for 8d5fc6e corrected: three mismatches plus one #142 correction.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SnAJ7Z3CpVD3PRbN73QtU2
Files changed:
- CHANGES.md
- VERSION
- tools/chemenu/tests/test_cli.py
This commit is contained in:
1 parent
8d5fc6e941
commit
8f61209b6b
3 files changed
+33
-16
No files matched your search
@@ -367,5 +367,10 @@ def test_stderr_hint_follows_the_error_line_when_streams_are_merged(tmp_path):
|
||||
assert result.returncode == 1
|
||||
lines = result.stdout.splitlines()
|
||||
assert lines[0] == "ERROR tools/CONTRACT.md is missing."
|
||||
# Pinned literally, not only against `render_failure_hint`: that comparison
|
||||
# alone would pass unchanged if the record lost its cause again, since both
|
||||
# sides would then fall back to the same `see:` line.
|
||||
assert lines[1] == "ON FAILURE (wikitool docs contract -h):"
|
||||
assert lines[2].startswith(" `tools/CONTRACT.md` is missing -> Not transient - restore the file")
|
||||
hint = cli_contract.render_failure_hint(cli_contract.get("docs contract"))
|
||||
assert "\n".join(lines[1:]) == hint
|
||||
Reference in new issue
Block a user