Repository navigation
Drop the assert wrapping the call that raises in test_zone_ooz_name - #1404
Merged
rthalley merged 1 commit intoNov 4, 2026
Merged
Conversation
txn.name_exists() on an out-of-zone name is what raises KeyError, so the assert never evaluates its operand. Inverting it to `assert not` on main leaves the test passing. The call stays, since it is the raiser.
rthalley
pushed a commit
that referenced
this pull request
Nov 5, 2026
The assertTrue(False) sits after the from_text call inside assertRaises(SyntaxError), so it only runs if from_text does not raise, and assertRaises already fails in that case. Replacing it with a RuntimeError, which assertRaises(SyntaxError) would not swallow, leaves all ten tests in the file passing, so the line is unreachable. testFailFromText2, 3 and 4 do not have it. This is the same shape as #1404. The assertTrue(False) elsewhere in the suite is a different idiom: those sit in a try block ahead of an except clause, where the line does run if the call unexpectedly succeeds.
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.
txn.name_exists()on an out-of-zone name is what raisesKeyError, so theassertaround it never evaluates its operand.Checked by inverting it:
assert not txn.name_exists(a99)onmainleaves the test passing. The call stays, since it is the raiser, and only theassertgoes.tests/test_transaction.pygives 83 passed.