From: R David Murray Date: Thu, 2 Jan 2014 18:37:26 +0000 (-0500) Subject: #17282: Document unittest.main defaultTest argument. X-Git-Tag: v3.4.0b2~46^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=12e930f3a4fd84bde01c67976f108000e704d835;p=thirdparty%2FPython%2Fcpython.git #17282: Document unittest.main defaultTest argument. --- diff --git a/Doc/library/unittest.rst b/Doc/library/unittest.rst index 5157b267662f..fcfd514d0150 100644 --- a/Doc/library/unittest.rst +++ b/Doc/library/unittest.rst @@ -1801,6 +1801,10 @@ Loading and running tests if __name__ == '__main__': unittest.main(verbosity=2) + The *defaultTest* argument is the name of the test to run if no test names + are specified via *argv*. If not specified or ``None`` and no test names are + provided via *argv*, all tests found in *module* are run. + The *argv* argument can be a list of options passed to the program, with the first element being the program name. If not specified or ``None``, the values of :data:`sys.argv` are used.