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

Eric Larson larson.eric.d at gmail.com
Sun Aug 3 09:24:11 PDT 2014


Okay, if you're going to twist my arm about it :)

https://github.com/nose-devs/nose/issues/829

Eric



On Sun, Aug 3, 2014 at 6:00 AM, Ned Batchelder <ned at nedbatchelder.com>
wrote:

>  Eric, if by "make my own custom nose plugin," you mean, "submit a patch
> to the nose plugin that implements the option to skip the report," then
> yes, that sounds good! :)
>
> --Ned.
>
>
> On 8/2/14 8:36 PM, Eric Larson wrote:
>
> 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
>>
>>
>
>
> _______________________________________________
> 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/20140803/7d709c76/attachment-0001.htm>


More information about the testing-in-python mailing list