(original) (raw)

changeset: 88259:045e7a587f3c branch: 3.3 parent: 88257:b0d472e3ff42 user: R David Murray rdmurray@bitdance.com date: Thu Jan 02 13:37:26 2014 -0500 files: Doc/library/unittest.rst description: #17282: Document unittest.main defaultTest argument. diff -r b0d472e3ff42 -r 045e7a587f3c Doc/library/unittest.rst --- a/Doc/library/unittest.rst Thu Jan 02 12:24:08 2014 -0600 +++ b/Doc/library/unittest.rst Thu Jan 02 13:37:26 2014 -0500 @@ -1801,6 +1801,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