[Twisted-Python] Trial: testing multiple test modules in one go?
general at vultaire.net
Wed Nov 4 20:50:05 EST 2009
My project has 160 or so test functions spread across 29 test modules.
The layout is something like this:
Running tests one-by-one ("trial tests.<test_module>") 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.<test_module_1> import *
from tests.<test_module_2> 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
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?
- Paul Goins
More information about the Twisted-Python