I have my code organized like this:
base_project_dir/src /tests /test1.py /test2.py
in test1.py and test2.py I have the classes extending unittest.TestCase
according to python API doc, I should be able to run
python -m unittest tests from base dir and run all tests. but doing so shows that it finds 0 tests. so I added from test1 import * from test2 import *
into tests/__init__.py
now the above command works. but when I want to run individual tests, it sources the module init, which forcefully run all tests.
what is the correct way to organize this?
thanks Yang