Skip to content
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

Fix intermittent coverage bug #138

Merged
merged 1 commit into from Jul 7, 2020
Merged

Fix intermittent coverage bug #138

merged 1 commit into from Jul 7, 2020

Conversation

ghost
Copy link

@ghost ghost commented Jul 3, 2020

As seen here, the coverage report oscillates between 100% and 99.67%. The specific line that is sometimes missed can be seen here.

After some digging, I found that this problem is caused by a CPython optimization where the continue statement is not explicitly executed when it follows a if True or *: statement. The problem is discussed at nedbat/coveragepy#198.

The fix is not ideal but should not cause any future errors. The test_max_words and test_min_words tests should make sure that this not covered statement is run when needed.

See nedbat/coveragepy#198. Although this line
is reached, the CPython interpreter does not execute it and so it is
incorrectly labeled as missed.
@coveralls
Copy link

Coverage Status

Coverage increased (+0.3%) to 100.0% when pulling df8db03 on berfr:fix-intermittent-coverage-bug into 8370464 on jsvine:master.

@jsvine jsvine merged commit ff84ba4 into jsvine:master Jul 7, 2020
@jsvine
Copy link
Owner

jsvine commented Jul 7, 2020

Wow, great sleuthing! Thank you for looking into this. Merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants