views:

15

answers:

2

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?

A: 

Have a look at nose. It can also be called programmatically, and it may thus be used to call your tests once you've configured it.

Ivo
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