Missing branch coverage for DFA.random_word()
See original GitHub issue@Tagl I am getting pretty close to releasing v7 (hooray!). However, I noticed that there was a slight drop in code coverage with the introduction of DFA.random_word()
. Since you implemented that method, I wanted to ask for your help in covering that additional case.
From what I can tell, the outer loop never runs for more than one iteration (either that, or it never completes without a break). In your tests, you seem to be testing high-enough values of k
, so I suspect the real gap may be not testing random_word()
with a partial DFA (i.e. allow_partial=True
). But I could certainly be wrong. 😅
I would appreciate any help you can offer. Screenshots are provided below.
HTML coverage report (locally):
Coveralls Report (link)
Issue Analytics
- State:
- Created 10 months ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
How to report missing branch coverage | Verification Academy
Branch coverage is 98.8% -- couldn't understand which branches are missed. Someone help, whether am I missing something here or how can see ......
Read more >Write Tests for all your Missed Branches | by Nikit Bhandari
Branch coverage is a metric that indicates whether all branches in a codebase are exercised by tests. A “branch” is one of the...
Read more >Missing branch coverage while using Sealed Classes #1219
Using Sealed Classes within a when is exhaustive. So the branch coverage should be 100% in given example. Actual behaviour. Jacoco reports the...
Read more >Code coverage missing a branch if a function takes reference ...
In my (lcov) code coverage with google unit tests, it is saying missing a branch with TestA() function, and symbols list have a ......
Read more >Branch coverage measurement — Coverage.py 6.4.4 ...
Each line in the file is an execution opportunity, as is each branch destination. The HTML report gives information about which lines had...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Tagl That totally makes sense. And it wouldn’t be the first time there’s been an unreachable branch in the codebase (i.e. search for
# pragma: no branch
😅).In that case, it should be safe to ignore the coverage by adding a
# pragma: no branch
, meaning I can move forward with publishing v7 today! 🎉Closing this issue since I resolved it shortly before releasing v7 recently. 😃