-
-
Notifications
You must be signed in to change notification settings - Fork 443
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect coverage with branching and continue #496
Comments
Can you show what you mean by "bumped down a line"? |
I tried reproducing your problem, but I see 100% coverage:
|
Original comment by Eli Skeggs (Bitbucket: skeggse, GitHub: skeggse) So it's an environment issue, I guess? What would impact this? I'm running Python
|
Original comment by Eli Skeggs (Bitbucket: skeggse, GitHub: skeggse) I'm able to reproduce on a hosted Ubuntu VM running Python 3.4.3 (it also has 2.7 installed, and if I install Coverage.py with pip2, I can't reproduce the issue). I sent you some instructions on getting quick access to said VM. |
OK, I've reproduced it: Python 3.4 shows the missing branch, Python 2.7 does not. |
Original comment by Loic Dachary (Bitbucket: dachary, GitHub: dachary) For the record the proposed fix is at https://bitbucket.org/ned/coveragepy/pull-requests/104/arcs-from-continue-must-go-to_top-instead/diff |
Fix #496, while-true loop with a continue. → <<cset bd2f12dd55da (bb)>> |
Fixed in bd2f12dd55da (bb), which will be in version 4.3. |
BTW, the problem isn't about the "continue" being on the same line as the if. It's about a constant while condition (while True), and a continue statement. |
This fix was released as part of Coverage.py 4.3. |
Originally reported by Eli Skeggs (Bitbucket: skeggse, GitHub: skeggse)
Here's a simple python script:
The html coverage resulting from both
coverage run --branch example.py
orcoverage run --branch --timid example.py
, reports that thecontinue
statement was never executed. If thecontinue
statement is bumped down a line, it works as expected.coverage --version
reportsversion 4.1 with C extension
The text was updated successfully, but these errors were encountered: