[TIP] How do I get coverage on the test modules themselves?
marius at gedmin.as
Tue Sep 16 08:50:48 PDT 2014
On Tue, Sep 16, 2014 at 06:45:07AM -0400, Ned Batchelder wrote:
> Others have explained the "don't cover your tests" mindset. I like
> coverage-measuring my tests, for the simple reason that it gives me
> assurance that the tests are actually running. If you've ever
> copy-pasted a test to make a new similar test, but forgot to change
> the method name, you've had tests that don't run. Coverage can find
> those problems.
I also used to rely on eyeballing test coverage results to catch errors
like these, but pyflakes catches that in a more reliable fashion.
Test coverage is still useful in finding out which parts of your stubs
or helpers are no longer used.
Linux don't need no steenkin' viruses. The users can destroy the
system all by themselves....
-- Peter Dalgaard in comp.os.linux.misc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 173 bytes
Desc: Digital signature
More information about the testing-in-python