[Python-Dev] We now have C code coverage!
hobsonlane at gmail.com
Mon Jul 2 12:10:46 EDT 2018
` # noqa` works with linters
On Fri, Jun 29, 2018 at 6:25 AM, Brett Cannon <brett at python.org> wrote:
> On Thu, Jun 28, 2018, 21:28 Terry Reedy, <tjreedy at udel.edu> wrote:
>> On 6/24/2018 5:03 AM, Ammar Askar wrote:
>> >> Is it possible, given that we are not paying for those reports, to
>> >> customize the 'exclude_lines' definitions?
>> > Do you want to exclude python code or C code?
>> Python code.
>> > For Python code, coverage.py also has some comments you can
>> > put down to exclude lines:
>> > http://coverage.readthedocs.io/en/coverage-4.2/excluding.html
>> Yes, by default, one can use '# pragma: no cover' and if one uses the
>> --branch flag, '# pragma: no branch'. For more 'advanced exclusion',
>> one can use the following, normally in .coveragerc.
>> exclude_lines = ...
>> "This is useful if you have often-used constructs to exclude that can be
>> matched with a regex. You can exclude them all at once without littering
>> your code with exclusion pragmas."
>> For IDLE's test suite, I use a customized .coveragerc. I strongly
>> prefer to not abandon that and litter the code with # pragmas.
>> In order to make sense of the coverage report and have it be truthful,
>> one needs to know what options are being used.
>> Is the --branch flag set?
>> Is .coveragerc or some other configuration file in use?
>> If so, what is the content?
>> Do we have any control over the use and content of exclusion settings?
> Everything is either covered by the Travis or codecov configuration files
> which are both checked into the cpython repo. (I'm on vacation or else I
> would provide links to the files themselves.)
>> Terry Jan Reedy
>> Python-Dev mailing list
>> Python-Dev at python.org
>> Unsubscribe: https://mail.python.org/mailman/options/python-dev/
> Python-Dev mailing list
> Python-Dev at python.org
> Unsubscribe: https://mail.python.org/mailman/options/python-dev/
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-Dev