Bugs item #1681984, was opened at 2007-03-16 06:17 Message generated for change (Settings changed) made by collinwinter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1681984&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Documentation Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: STINNER Victor (haypo) >Assigned to: Collin Winter (collinwinter) Summary: unittest documentation is incomplete Initial Comment: When I tried to write a test suite using many test cases, I read the documentation (docs.python.org) but it does work because I was unable to run my test suite. Using Google I realised that documentation is incomplete! In Python binding of gstreamer, I found a "TextTestRunner"! So, would it be possible to update the doc? ---------------------------------------------------------------------- Comment By: STINNER Victor (haypo) Date: 2007-03-18 22:00 Message: Logged In: YES user_id=365388 Originator: YES "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< ----------------------- ---------------------------------------------------------------------- Comment By: Georg Brandl (gbrandl) Date: 2007-03-16 09:02 Message: Logged In: YES user_id=849994 Originator: NO Could you please state what exactly is missing from the documentation, in your opinion? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1681984&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com