How do I run all Python unit tests in a directory?
With Python 2.7 and higher you don’t have to write new code or use third-party tools to do this; recursive test execution via the command line is built-in. Put an __init__.py in your test directory and: python -m unittest discover <test_directory> # or python -m unittest discover -s <directory> -p ‘*_test.py’ You can read more … Read more