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

Craig Rodrigues rodrigc at crodrigues.org
Mon Jul 4 01:00:40 MDT 2016


On Sun, Jul 3, 2016 at 11:00 PM, Adi Roiban <adi at roiban.ro> wrote:

>
>
>
> 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
>
>
>
Is it possible to add the actual invocation of setup.py to coverage?

That seems like a hole that the actual invocation of setup.py that does the
build and install
is not part of the coverage reporting.  setup.py is just a Python script,
so why can't it be run under coverage?

--
Craig
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20160704/34a2b9b9/attachment-0002.html>


More information about the Twisted-Python mailing list