'Return a test suite with all the tests from a module.
Included are TestCase subclasses and doctests listed in the module\'s
__doctests__ module. If that\'s not good for you, put a function named
either C{testSuite} or C{test_suite} in your module that returns a
TestSuite, and I\'ll use the results of that instead.
If C{testSuite} and C{test_suite} are both present, then I\'ll use
C{testSuite}.'

def loadModule(self, module):

    if (not isinstance(module, types.ModuleType)):
        raise TypeError(('%r    is    not    a    module' % (module,)))
    if hasattr(module, 'testSuite'):
        return module.testSuite()
    elif hasattr(module, 'test_suite'):
        return module.test_suite()
    suite = self.suiteFactory()
    for testClass in self.findTestClasses(module):
        suite.addTest(self.loadClass(testClass))
    if (not hasattr(module, '__doctests__')):
        return suite
    docSuite = self.suiteFactory()
    for docTest in module.__doctests__:
        docSuite.addTest(self.loadDoctests(docTest))
    return self.suiteFactory([suite, docSuite])
