I have several modules full of test-cases and would like to create one module that runs them all. I tried loading the tests in each of the modules using TestLoader.loadTestFromModule
, but it always returns empty test-suites. What is the easiest way to achieve this?
views:
15answers:
2
A:
Ok, the problem there was that I handed in the modules-names as strings, when I should have been handing in module-objects like this:
import unittest
import SomeTestModule
loader = unittest.TestLoader()
loader.loadTestsFromModule(SomeTestModule)
Really a beginners mistake.
Space_C0wb0y
2010-08-16 19:25:33