(original) (raw)

changeset: 88260:69b5f6924553 branch: 2.7 parent: 88244:aeb70f2f6f38 user: R David Murray rdmurray@bitdance.com date: Thu Jan 02 13:38:02 2014 -0500 files: Doc/library/unittest.rst description: #17282: Document unittest.main defaultTest argument. diff -r aeb70f2f6f38 -r 69b5f6924553 Doc/library/unittest.rst --- a/Doc/library/unittest.rst Wed Jan 01 13:03:24 2014 -0800 +++ b/Doc/library/unittest.rst Thu Jan 02 13:38:02 2014 -0500 @@ -1808,6 +1808,10 @@ 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. /rdmurray@bitdance.com