Repository navigation
test_dead_block_refs: the live-ref check asserts that stderr is empty - #114
Merged
Merged
Conversation
test_page_without_dead_refs_says_nothing searched stderr for "dead", but the notice reads "points at a block that no longer exists", so the check could never fail. The JSON check beside it does not cover the notice either: a live ref reported as dead is inlined before the payload is built, so the payload stays clean while stderr carries the claim. Checking for the notice's wording would go blind the same way the day the message is reworded, and no other test in the file pins that wording; they look for the uuid. The test now asserts that stderr is empty, which is what its name claims. With a live ref added to the dead list, the empty-page guard removed and the message reworded, the old assertion, a wording check and the JSON check all pass; the new assertion fails. test_without_resolve_refs_nothing_is_claimed keeps its wording check: its get_block.assert_not_called() already fails for every regression I could construct there, so no mutation separates a rewritten check from it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
test_page_without_dead_refs_says_nothingsearched stderr for "dead", but the notice reads "points at a block that no longer exists", so the check could never fail. The JSON check beside it does not cover the notice either: a live ref reported as dead is inlined before the payload is built, so the payload stays clean while stderr carries the claim.The test now asserts that stderr is empty, which is what its name claims. Checking for the notice's wording would go blind the same way the day the message is reworded, and no other test in the file pins that wording.
Checked: with a live ref added to the dead list, the empty-page guard removed and the message reworded, the old assertion, a wording check and the JSON check all pass; the new assertion fails. 3265 tests,
ruff check ..test_without_resolve_refs_nothing_is_claimedkeeps its wording check: itsget_block.assert_not_called()already fails for every regression I could construct there, so no mutation separates a rewritten check from it.