-
Notifications
You must be signed in to change notification settings - Fork 317
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
Add branch coverage, improve overall coverage #356
Comments
One note here, the large "uncovered" areas in the code are:
And also I think all of those can also use explicit tests (testing expected result / html). |
The tests are now (v0.15.0) using --cov-branch parameter and we reached 87% of coverage. I think it covers the expectations of this issue. Let me know if I can close it. |
I think we can close. It can always be better, but 87% coverage is much better than 66% :) |
With #352, we now have a baseline established for code coverage under test.
Adding
--cov-branch
knocks down the effective coverage by a couple points, and reveals some places where multiple conditionals within a given function might affect each other.Further, 66% isn't awe-inspiring, and it should be possible to substantially improve this value... and most likely find some new bugs along the way.
A powerful tool for confidently increasing coverage without adding many little tests is property-based testing, for which hypothesis is the really the only game in python-town. Property-based testing is very effective at finding lots of failing cases by trying lots of (crazy) cases, but crucially reduces a class of failures to a minimal example.
I'll take a look and see what I can find...
The text was updated successfully, but these errors were encountered: