test(config): the guard reader is asserted where its answers differ - #291
Merged
Merged
Conversation
Codecov named one uncovered line in the previous commit: the branch that recognises a word for yes. Covering it took one loop. Proving it took a second one, in a different place, and the difference is the point. strict_scope defaults to True, so on that flag the yes branch and the fallthrough to the default return the same answer. A reader that recognised no word for yes at all would have passed every assertion about CYBERAI_STRICT_SCOPE, including the new loop that executes the line. Measured, not reasoned: with the branch deleted the suite stayed green, and the mutant survived a run whose coverage report showed the line executed. The assertion that kills it is on _env_guard_bool with a default of False, where yes and the default disagree. The matching no-branch mutant is killed four times over, since a flag defaulting to on already separates those. A covered line is not a tested one. The branch was both at once for an hour.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Codecov named one uncovered line in the previous commit: the branch that recognises a word for yes. Covering it took one loop. Proving it took a second one, in a different place, and the difference is the point.
strict_scope defaults to True, so on that flag the yes branch and the fallthrough to the default return the same answer. A reader that recognised no word for yes at all would have passed every assertion about CYBERAI_STRICT_SCOPE, including the new loop that executes the line. Measured, not reasoned: with the branch deleted the suite stayed green, and the mutant survived a run whose coverage report showed the line executed.
The assertion that kills it is on _env_guard_bool with a default of False, where yes and the default disagree. The matching no-branch mutant is killed four times over, since a flag defaulting to on already separates those.
A covered line is not a tested one. The branch was both at once for an hour.
What this changes
How it was measured
Checklist
ruff format --check cyberai/ tests/andruff check cyberai/ tests/passpytest -W ignore::DeprecationWarning -m "not slow and not smoke"passes