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

Adi Roiban adi at roiban.ro
Mon Jul 4 05:36:40 MDT 2016


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

> On Sun, Jul 3, 2016 at 11:00 PM, Adi Roiban <adi at roiban.ro> wrote:
>
>>
>>
>> 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
>>
>>
>
>
> In https://github.com/twisted/twisted/pull/224 , I made no changes to
> twisted/python/dist3.py, so
> making changes to test_dist3.py will not help.
>
>
I added twisted.python.test.test_dist to the list of tests executed on
> Python 3 in https://github.com/twisted/twisted/pull/288 and that
> fixed the coverage problem.
>
>
I think that dist.py vs dist3.py was made on purpose as 2 different file.
That is, you should not have any `if _PY3` code in any of those files.

But I might be wrong :)

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


More information about the Twisted-Python mailing list