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

Victor Stinner vstinner at redhat.com
Wed May 1 08:21:54 EDT 2019


Le mer. 1 mai 2019 à 03:12, Chris Withers <chris at withers.org> a écrit :
> Right, but that's not the documented way of running individual suites in
> the devguide.

Maybe, but I'm using that sometimes and it's useful for some specific
issues. Is it possible to run an individual test file using unittest?

Something like ./python -m unittest
Lib/unittest/test/testmock/testcallable.py -v

Victor
-- 
Night gathers, and now my watch begins. It shall not end until my death.


More information about the Python-Dev mailing list