[Python-checkins] r87679 - python/branches/py3k/Doc/library/unittest.rst

michael.foord python-checkins at python.org
Mon Jan 3 13:55:11 CET 2011


Author: michael.foord
Date: Mon Jan  3 13:55:11 2011
New Revision: 87679

Log:
Issue 10786: unittest documentation update.

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	Mon Jan  3 13:55:11 2011
@@ -1870,9 +1870,10 @@
    instead of repeatedly creating new instances.
 
 
-.. class:: TextTestRunner(stream=sys.stderr, descriptions=True, verbosity=1, runnerclass=None, warnings=None)
+.. class:: TextTestRunner(stream=None, descriptions=True, verbosity=1, runnerclass=None, warnings=None)
 
-   A basic test runner implementation which prints results on standard error.  It
+   A basic test runner implementation that outputs results to a stream. If *stream*
+   is `None`, the default, `sys.stderr` is used as the output stream. This class
    has a few configurable parameters, but is essentially very simple.  Graphical
    applications which run test suites should provide alternate implementations.
 
@@ -1885,6 +1886,13 @@
    messages.  This behavior can be overridden using the :option:`-Wd` or
    :option:`-Wa` options and leaving *warnings* to ``None``.
 
+   .. versionchanged:: 3.2
+      Added the ``warnings`` argument.
+
+   .. versionchanged:: 3.2
+      The default stream is set to `sys.stderr` at instantiation time rather
+      than import time.
+
    .. method:: _makeResult()
 
       This method returns the instance of ``TestResult`` used by :meth:`run`.
@@ -1898,8 +1906,6 @@
 
         stream, descriptions, verbosity
 
-   .. versionchanged:: 3.2
-      Added the ``warnings`` argument.
 
 .. function:: main(module='__main__', defaultTest=None, argv=None, testRunner=None, \
                    testLoader=unittest.loader.defaultTestLoader, exit=True, verbosity=1, \


More information about the Python-checkins mailing list