Status: Accepted
Owner: ----
Labels: Type-Enhancement Priority-Medium CodeInCategory-Code
CodeInCategory-QA CodeInMultiple CodeInDifficulty-Medium
New issue 2859 by [email protected]: Improve code coverage
http://code.google.com/p/sympy/issues/detail?id=2859
This is a stand-in issue to increase code coverage. While you should
always be careful about writing tests for no reason other than to increase
coverage, it's also good to have good coverage (I personally have found a
lot of bugs this way). I think somewhere around 90% is pretty good, and
80% is healthy.
Note that coverage is tested using the `bin/coverage_report.py` script.
This requires the coverage module (it will tell you if you try to run it
and don't have it). This will run the test suite and create a coverage
report from it (it's pretty self-explanatory).
Note that there are some subtlties with coverage testing. It's based on
lines, so for example, something like
if a or b:
will be considered covered, even if only the a condition is ever hit (it
will short-circuit and not hit b). Also, something like
if a: do_something # one line
will be considered covered even if a is never true. The solution to this
last one is to never have one-line statements like this, but to instead
always write:
if a:
do_something
which is cleaner anyway. See also issue 1807, issue 2708, and issue 2799
for some more subtitles.
Note that this is not the same as the doctest coverage from issue 294.
I set the difficulty as Medium, because when you increase coverage, you
invariably find bugs, which you then have to fix (that's the whole point of
doing this anyway).
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sympy-issues?hl=en.