[Twisted-Python] Python 3 code coverage not working?

Adi Roiban adi at roiban.ro
Mon Jul 4 00:00:08 MDT 2016


On 4 July 2016 at 00:43, Craig Rodrigues <rodrigc at crodrigues.org> wrote:

> Hi,
>
> I submitted this pull request:
> https://github.com/twisted/twisted/pull/224
>
> and codecov is saying that only 66.67% of the patch is covered because it
> is not hitting the Python 3 specific block:
>
> https://codecov.io/gh/twisted/twisted/compare/502f3a1e2cc125d214b6b7df5b173aa91fc7f966...d286bf22f8b653f75dc3a22cedbe295370435163
>
> This buildbot ran the build on Python 3 and uploaded a coverage report:
>
> https://buildbot.twistedmatrix.com/builders/fedora22-py3.4-coverage/builds/630
>
> Is something wrong here?  I don't understand how Python 3 coverage is not
> reported.
>

Only the modules (including the test modules) from dist3.py are executed on
Python3
https://github.com/twisted/twisted/blob/trunk/twisted/python/dist3.py

In the header of that file you can see

# -*- test-case-name: twisted.python.test.test_dist3 -*-

and also in the test modules we have

twisted.python.test.test_dist3

---------------

That is you need to make the changes in that module

twisted.python.test.test_dist is not executed on Python3 ... hence its
coverage is not reported on Python3

Hope this helps!

-- 
Adi Roiban
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20160704/54cb797c/attachment-0002.html>


More information about the Twisted-Python mailing list