[Python-checkins] r80606 - python/trunk/Doc/library/unittest.rst

andrew.kuchling python-checkins at python.org
Thu Apr 29 03:44:31 CEST 2010


Author: andrew.kuchling
Date: Thu Apr 29 03:44:30 2010
New Revision: 80606

Log:
Fix doubled 'the'.
Markup fixes to use :exc:, :option: in a few places.
  (Glitch: unittest.main's -c ends up a link to the Python
  interpreter's -c option.  Should we skip using :option: for that
  switch, or disable the auto-linking somehow?)


Modified:
   python/trunk/Doc/library/unittest.rst

Modified: python/trunk/Doc/library/unittest.rst
==============================================================================
--- python/trunk/Doc/library/unittest.rst	(original)
+++ python/trunk/Doc/library/unittest.rst	Thu Apr 29 03:44:30 2010
@@ -223,26 +223,26 @@
 
 unittest supports three command options.
 
-* -f / --failfast
+* :option:`-b` / :option:`--buffer`
 
-  Stop the test run on the first error or failure.
+  The standard output and standard error streams are buffered during the test
+  run. Output during a passing test is discarded. Output is echoed normally
+  on test fail or error and is added to the failure messages.
 
-* -c / --catch
+* :option:`-c` / :option:`--catch`
 
-  Control-c during the test run waits for the current test to end and then
-  reports all the results so far. A second control-c raises the normal
-  ``KeyboardInterrupt`` exception.
+  Control-C during the test run waits for the current test to end and then
+  reports all the results so far. A second control-C raises the normal
+  :exc:`KeyboardInterrupt` exception.
 
   See `Signal Handling`_ for the functions that provide this functionality.
 
-* -b / --buffer
+* :option:`-f` / :option:`--failfast`
 
-  The standard out and standard error streams are buffered during the test
-  run. Output during a passing test is discarded. Output is echoed normally
-  on test fail or error and is added to the failure messages.
+  Stop the test run on the first error or failure.
 
 ..  versionadded:: 2.7
-   The command line options ``-c``, ``-b`` and ``-f`` where added.
+   The command line options ``-c``, ``-b`` and ``-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.
@@ -807,7 +807,7 @@
       compare equal, the test will fail with the explanation given by *msg*, or
       :const:`None`.
 
-      If *delta* is supplied instead of *places* then the the difference
+      If *delta* is supplied instead of *places* then the difference
       between *first* and *second* must be less than *delta*.
 
       Supplying both *delta* and *places* raises a ``TypeError``.
@@ -832,7 +832,7 @@
       compare equal, the test will fail with the explanation given by *msg*, or
       :const:`None`.
 
-      If *delta* is supplied instead of *places* then the the difference
+      If *delta* is supplied instead of *places* then the difference
       between *first* and *second* must be more than *delta*.
 
       Supplying both *delta* and *places* raises a ``TypeError``.
@@ -1848,12 +1848,12 @@
 Signal Handling
 ---------------
 
-The -c / --catch command line option to unittest, along with the ``catchbreak``
+The :option:`-c`/:option:`--catch` 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
+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
-``KeyboardInterrupt`` in the usual way.
+: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``


More information about the Python-checkins mailing list