[Python-checkins] cpython (merge 3.3 -> default): Merge and update #17282: Document unittest.main defaultTest argument.
r.david.murray
python-checkins at python.org
Thu Jan 2 19:44:54 CET 2014
http://hg.python.org/cpython/rev/1bbf8c263d3c
changeset: 88261:1bbf8c263d3c
parent: 88258:c265675cd8e2
parent: 88259:045e7a587f3c
user: R David Murray <rdmurray at bitdance.com>
date: Thu Jan 02 13:43:02 2014 -0500
summary:
Merge and update #17282: Document unittest.main defaultTest argument.
In 3.4 defaultTest can also be a list (see issue 15132).
files:
Doc/library/unittest.rst | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/Doc/library/unittest.rst b/Doc/library/unittest.rst
--- a/Doc/library/unittest.rst
+++ b/Doc/library/unittest.rst
@@ -1966,6 +1966,11 @@
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.
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list