[TIP] Coverage + nose, suppress printing of coverage information

Eric Larson larson.eric.d at gmail.com
Sat Aug 2 17:36:15 PDT 2014


Hey Ned,

I might give that a shot. Your comment also got me thinking that I could
make my own custom nose plugin that utilizes your module without making the
report() command that the built-in one does. That solution might work
better for the projects I have in mind -- but in either case, thanks for
the quick response!

Cheers,
Eric



On Sat, Aug 2, 2014 at 4:07 PM, Ned Batchelder <ned at nedbatchelder.com>
wrote:

>  On 8/2/14 6:16 PM, Eric Larson wrote:
>
> Hello,
>
>  I am using `nose` combined with `coverage` to test code coverage in
> several projects, and it is working well. However, I would like to be able
> to run nosetests and generate coverage information (i.e., the .coverage
> file) but *not* print the results of the coverage report to the terminal.
>
>   It sounds like you are using the coverage nose plugin.  It prints a
> textual report when the tests are finished.
>
>  In my case, each PR on Github automatically sends info to Coveralls,
> which generates nice reports, so I don't need to see it. Moreover, having
> the printout makes it more difficult to scroll to the points in the tests
> that might have failed.
>
>  Is there a way to generate coverage information but not print it out?
>
>
> I prefer to use coverage to run nosetests rather than to run coverage
> within nose.  The nose plugin seems to have no option to skip the report.
> "coverage run" will run a program under coverage measurement, then later
> (if you wish), "coverage report" will report on the results.
>
>
>  Cheers,
> Eric
>
>
>
> _______________________________________________
> testing-in-python mailing listtesting-in-python at lists.idyll.orghttp://lists.idyll.org/listinfo/testing-in-python
>
>
>
> _______________________________________________
> testing-in-python mailing list
> testing-in-python at lists.idyll.org
> http://lists.idyll.org/listinfo/testing-in-python
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20140802/3ae34b94/attachment.htm>


More information about the testing-in-python mailing list