[Python-Dev] "if __name__ == '__main__'" at the bottom of python unittest files
Chris Withers
chris at withers.org
Wed May 1 08:56:44 EDT 2019
More information about the Python-Dev mailing list
Wed May 1 08:56:44 EDT 2019
- Previous message (by thread): [Python-Dev] "if __name__ == '__main__'" at the bottom of python unittest files
- Next message (by thread): [Python-Dev] "if __name__ == '__main__'" at the bottom of python unittest files
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Sorry, accidentally include a comment for this in a reply to Paul: On 01/05/2019 13:39, Serhiy Storchaka wrote: > We try to support several different ways of running tests. This allows > to catch some environment depended flaws in tests and serves as a kind > of the test of unittest itself. Not all test files are made discoverable > yet, but we move in this direction. I'm not sure I understand how triggering via unittest or via unittest (no typo, both these __main__ blocks and python -m unittest are using the same test runner) could make a difference. And sorry, to be clear, I'm only taking about the ones in unittest/mock/testmock - Rob Collins confirmed these where never needed in a private reply: > They were never needed 😁 > > Removal is fine with me. Chris
- Previous message (by thread): [Python-Dev] "if __name__ == '__main__'" at the bottom of python unittest files
- Next message (by thread): [Python-Dev] "if __name__ == '__main__'" at the bottom of python unittest files
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list