"Could you please state what exactly is missing from the documentation, in your opinion?"
Well, when I ready Python documentation I expect to have the full list of "builtin" modules, functions and classes. But if you check unittest module, documentation only list TestCase, TestSuite, TestResult and TestLoader. Whereas dir(unittest) gives TestCase, TestLoader, *TestProgram*, TestResult, TestSuite, *TextTestRunner*.
So information about TestProgram and TextTestRunner is missing.
I also expect a small example showing how to use a test runner and a test suite.
I'm using:
------------------------------ 8< -----------------------
from unittest import TestSuite, TestLoader, TextTestRunner
from sys import exit
def loadTests(loader):
"""Generator listing all test cases"""
...
def main():
loader = TestLoader()
suite = TestSuite()
for test in loadTests(loader.loadTestsFromTestCase):
suite.addTests(test)
runner = TextTestRunner(descriptions=2, verbosity=2)
result = runner.run(suite)
if result.failures or result.errors:
exit(1)
------------------------------ 8< -----------------------
|