summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorMichael Foord <fuzzyman@voidspace.org.uk>2010-04-04 23:28:44 (GMT)
committerMichael Foord <fuzzyman@voidspace.org.uk>2010-04-04 23:28:44 (GMT)
commitddb20df018ac989635e02164893df661ef93fb5f (patch)
tree0b965692d2832d1c8680bff3c94735c1d5cf1dfe /Doc
parent76a23c17bcd9e3f47cbddaf6a2032bd1d27e0419 (diff)
downloadcpython-ddb20df018ac989635e02164893df661ef93fb5f.zip
cpython-ddb20df018ac989635e02164893df661ef93fb5f.tar.gz
cpython-ddb20df018ac989635e02164893df661ef93fb5f.tar.bz2
Adding documentation for new unittest.main() parameters
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/unittest.rst10
1 files changed, 7 insertions, 3 deletions
diff --git a/Doc/library/unittest.rst b/Doc/library/unittest.rst
index ec091ab..2a19d81 100644
--- a/Doc/library/unittest.rst
+++ b/Doc/library/unittest.rst
@@ -1665,8 +1665,8 @@ Loading and running tests
stream, descriptions, verbosity
-.. function:: main([module[, defaultTest[, argv[, testRunner[, testLoader[, exit, [verbosity]]]]]]])
-
+.. function:: main([module[, defaultTest[, argv[, testRunner[, testLoader[, exit[, verbosity[, failfast[, catchbreak[,buffer]]]]]]]]]])
+,
A command-line program that runs a set of tests; this is primarily for making
test modules conveniently executable. The simplest use for this function is to
include the following line at the end of a test script::
@@ -1691,11 +1691,15 @@ Loading and running tests
>>> from unittest import main
>>> main(module='test_module', exit=False)
+ The ``failfast``, ``catchbreak`` and ``buffer`` parameters have the same
+ effect as the `failfast, catch and buffer command line options`_.
+
Calling ``main`` actually returns an instance of the ``TestProgram`` class.
This stores the result of the tests run as the ``result`` attribute.
.. versionchanged:: 2.7
- The ``exit`` and ``verbosity`` parameters were added.
+ The ``exit``, ``verbosity``, ``failfast``, ``catchbreak`` and ``buffer``
+ parameters were added.
load_tests Protocol