[TIP] How do I get coverage on the test modules themselves?

Gregory Salvan apieum at gmail.com
Tue Sep 16 07:27:16 PDT 2014


oups sorry I forgot the option for reporting coverage on test code:
--cover-tests

2014-09-16 16:20 GMT+02:00 Gregory Salvan <apieum at gmail.com>:

> I recommend you to use nose plugin.
> nosetest will detect test_*.py files automatically and report coverage if
> option --with-coverage activated.
>
> A small example of usage:
> http://www.saltycrane.com/blog/2012/04/test-coverage-nose-and-coveragepy/
>
> report to nose cover plugin documentation for more information.
>
> 2014-09-16 3:46 GMT+02:00 Mcgregor, Cecil <cmcgregor at paypal.com>:
>
>>  I’m using coverage 3.7.1 with python 2.7.3 on Red Hat 4.1.2 linux
>>
>>
>>
>> I’ve been attempting to get coverage on the test code themselves. So far
>> coverage
>>
>> seems to ignore these files.
>>
>>
>>
>> It’s not obvious from the documentation how I can do this.
>>
>>
>>
>> How do I cover the test_*.py files as part of the coverage reports?
>>
>>
>>
>> Thanks
>>
>> _______________________________________________
>> 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/20140916/0955c8a2/attachment.htm>


More information about the testing-in-python mailing list