Achieve 100% branch coverage through targeted tests and defensive code marking#92
Merged
Achieve 100% branch coverage through targeted tests and defensive code marking#92
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #92 +/- ##
===========================================
+ Coverage 97.90% 100.00% +2.09%
===========================================
Files 7 7
Lines 763 755 -8
Branches 160 157 -3
===========================================
+ Hits 747 755 +8
+ Misses 10 0 -10
+ Partials 6 0 -6
🚀 New features to boost your workflow:
|
…over Co-authored-by: nanonyme <348449+nanonyme@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix branch coverage for existing code
Achieve 100% branch coverage through targeted tests and defensive code marking
Feb 19, 2026
nanonyme
reviewed
Feb 19, 2026
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.
Branch coverage was at 98% with several testable paths uncovered. Per project requirements, defensive code that cannot be reached through streaming C input should be marked
pragma: no cover.Tests Added
Example of added unicode string include test:
Defensive Code Marked
Four branches marked
pragma: no cover- unreachable due to tokenizer guarantees:\Wpattern catches all)Coverage: 98% → 100% (320 branches → 314 branches, 0 partial)
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.