My project has 160 or so test functions spread across 29 test modules.
The layout is something like this:
project_root/
<project>/
<module>.py
<module>.py
...
tests/
.py
.py
...
unit_tests.py
Running tests one-by-one ("trial tests.") works perfectly.
However, I want to test them all in one go, and can't find a "proper"
way to do it.
Currently to test it, I have a module, tests.unit_tests, which imports
all the tests from all other modules in the tests namespace via:
from tests. import *
from tests. import *
...
However, this is less than ideal, since if someone makes a unit test
class with the same name as one in another module, they overlap and one
ends up untested. (We just got blindsided by this to some degree, hence
the e-mail.)
I'll probably end up just attaching the test module's name as a prefix
to each test class, but I wanted to ask, is there a better, "proper" way
of doing this?
Thanks.
- Paul Goins