r86824 - python/branches/py3k/Doc/library/unittest.rst
Author: eric.araujo Date: Sat Nov 27 00:46:18 2010 New Revision: 86824 Log: Rewrap long lines + minor edits Modified: python/branches/py3k/Doc/library/unittest.rst Modified: python/branches/py3k/Doc/library/unittest.rst ============================================================================== --- python/branches/py3k/Doc/library/unittest.rst (original) +++ python/branches/py3k/Doc/library/unittest.rst Sat Nov 27 00:46:18 2010 @@ -191,7 +191,7 @@ .. _unittest-command-line-interface: -Command Line Interface +Command-Line Interface ---------------------- The unittest module can be used from the command line to run tests from @@ -221,8 +221,8 @@ not modules or classes. -failfast, catch and buffer command-line options -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Command-line options +~~~~~~~~~~~~~~~~~~~~ :program:`unittest` supports these command-line options: @@ -247,7 +247,8 @@ Stop the test run on the first error or failure. .. versionadded:: 3.2 - The command-line options :option:`-c`, :option:`-b` and :option:`-f` were added. + The command-line options :option:`-b`, :option:`-c` and :option:`-f` + were added. The command line can also be used for test discovery, for running all of the tests in a project or just a subset. @@ -1891,7 +1892,7 @@ >>> 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`_. + effect as the same-name `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. @@ -2055,12 +2056,11 @@ --------------- The :option:`-c/--catch <unittest -c>` command-line option to unittest, -along with the ``catchbreak`` -parameter to :func:`unittest.main()`, provide more friendly handling of -control-C during a test run. With catch break behavior enabled control-C will -allow the currently running test to complete, and the test run will then end -and report all the results so far. A second control-c will raise a -:exc:`KeyboardInterrupt` in the usual way. +along with the ``catchbreak`` parameter to :func:`unittest.main()`, provide +more friendly handling of control-C during a test run. With catch break +behavior enabled control-C will allow the currently running test to complete, +and the test run will then end and report all the results so far. A second +control-c will raise a :exc:`KeyboardInterrupt` in the usual way. The control-c handling signal handler attempts to remain compatible with code or tests that install their own :const:`signal.SIGINT` handler. If the ``unittest``
participants (1)
-
eric.araujo