-
-
Notifications
You must be signed in to change notification settings - Fork 448
Coverage issue with python short-circuit for loop #593
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
Labels
duplicate
This issue or pull request already exists
Comments
Original comment by Glen Nelson (Bitbucket: glen_nelson, GitHub: Unknown) The assembly:
We see on 47, we jump directly back to 7 (the for loop iterator) if v1 is false. If instead v2 is false, we fall through the jump to 60, hitting the continue (line 57), which brings us back to line 7. It looks the coverage is only counting it if we hit line 57. |
Duplicate of #198. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Originally reported by Glen Nelson (Bitbucket: glen_nelson, GitHub: Unknown)
Sample code below was run with:
Consider the following two files:
We would expect full coverage of 'foo' here from the test. As we can see, when item is 1-5, we should hit the continue, else we should reach the prints.
Running coverage through nosetests was done with the following command
The missing line is the 'continue', due to short-circuting.
The text was updated successfully, but these errors were encountered: