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/157264.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 filesAntoine Pitrou solipsis at pitrou.net
Wed May 1 06:48:31 EDT 2019
On Tue, 30 Apr 2019 22:24:53 +0100
Chris Withers <chris at withers.org> wrote:
> Hi All,
> 
> I have a crazy idea of getting unittest.mock up to 100% code coverage.
> 
> I noticed at the bottom of all of the test files in testmock/, there's a:
> 
> if __name__ == '__main__':
>      unittest.main()
> 
> ...block.
> 
> How would people feel about these going away? I don't *think* they're 
> needed now that we have unittest discover, but thought I'd ask.

If you are only asking to remove them because you want that score of
100% coverage, then I think you shouldn't.

Regards

Antoine.


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