If you have multiple directories in your test directory, then you have to add to each directory an __init__.py
file.
/home/johndoe/snakeoil
+-- test
+-- __init__.py
+-- frontend
+-- __init__.py
+-- test_foo.py
+-- backend
+-- __init__.py
+-- test_bar.py
Then to run every test at once, run:
python -m unittest discover -s /home/johndoe/snakeoil/test -t /home/johndoe/snakeoil
Source: python -m unittest -h
-s START, --start-directory START
Directory to start discovery ('.' default)
-t TOP, --top-level-directory TOP
Top level directory of project (defaults to start
directory)