A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2019-May/157260.html below:

[Python-Dev] "if __name__ == '__main__'" at the bottom of python unittest files

[Python-Dev] "if __name__ == '__main__'" at the bottom of python unittest files [Python-Dev] "if __name__ == '__main__'" at the bottom of python unittest filesChris Withers chris at withers.org
Wed May 1 02:13:16 EDT 2019
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
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4