On 01/05/2019 06:12, Terry Reedy wrote:
Such blocks should be excluded from coverage by the default .coveragerc file.  Mine came with

exclude_lines =
     # Don't complain if non-runnable code isn't run:
     if 0:
     if __name__ == .__main__.:
     if DEBUG:

Which .coveragerc are you referring to? There isn't one in the cpython repo and a current release of coverage.py doesn't appear to exclude these lines for me:

https://circleci.com/gh/testing-cabal/mock/20

(line 44 in mock/tests/testsentinel.py)

Chris
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to