summaryrefslogtreecommitdiffstats
path: root/Doc/library/unittest.rst
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2014-01-02 18:43:02 (GMT)
committerR David Murray <rdmurray@bitdance.com>2014-01-02 18:43:02 (GMT)
commit6e731b0a418784eba9065cddc2b0f665faff051c (patch)
tree0150e3f9bfe3f34c93bb5f3cbcdb867e0da1d398 /Doc/library/unittest.rst
parentc22eaecd53a3d9dc7ca441e6d6f1e0148469f1e9 (diff)
parent12e930f3a4fd84bde01c67976f108000e704d835 (diff)
downloadcpython-6e731b0a418784eba9065cddc2b0f665faff051c.zip
cpython-6e731b0a418784eba9065cddc2b0f665faff051c.tar.gz
cpython-6e731b0a418784eba9065cddc2b0f665faff051c.tar.bz2
Merge and update #17282: Document unittest.main defaultTest argument.
In 3.4 defaultTest can also be a list (see issue 15132).
Diffstat (limited to 'Doc/library/unittest.rst')
-rw-r--r--Doc/library/unittest.rst5
1 files changed, 5 insertions, 0 deletions
diff --git a/Doc/library/unittest.rst b/Doc/library/unittest.rst
index 46d303a..3f30127 100644
--- a/Doc/library/unittest.rst
+++ b/Doc/library/unittest.rst
@@ -1966,6 +1966,11 @@ Loading and running tests
if __name__ == '__main__':
unittest.main(verbosity=2)
+ The *defaultTest* argument is either the name of a single test or an
+ iterable of test names 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.