I have 2 directories containing tests:
project/
|
|-- test/
| |
| |-- __init__.py
| |-- test_1.py
|
|-- my_submodule/
|
|-- test/
|
|-- __init__.py
|-- test_2.py
How can I run all tests?
python -m unittest discover .
only runs test_1.py
and obviously
python -m unittest discover my_submodule
only runs test_2.py
unittest currently sees project/my_submodule as an arbitrary directory to ignore, not a package to import. Just add project/my_submodule/__init__.py to change that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With