summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorMichael Foord <fuzzyman@voidspace.org.uk>2011-01-03 12:55:11 (GMT)
committerMichael Foord <fuzzyman@voidspace.org.uk>2011-01-03 12:55:11 (GMT)
commitd218e956d2e56830bbc7d1eccb99f5ce7c4f1b0e (patch)
tree4db48343f6d57cc20e284adc0759b477d30e910c /Doc
parente33b7c61b14f62586f5378126d90c43d31dbe69e (diff)
downloadcpython-d218e956d2e56830bbc7d1eccb99f5ce7c4f1b0e.zip
cpython-d218e956d2e56830bbc7d1eccb99f5ce7c4f1b0e.tar.gz
cpython-d218e956d2e56830bbc7d1eccb99f5ce7c4f1b0e.tar.bz2
Issue 10786: unittest documentation update.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/unittest.rst14
1 files changed, 10 insertions, 4 deletions
diff --git a/Doc/library/unittest.rst b/Doc/library/unittest.rst
index 609789f..3b49ea0 100644
--- a/Doc/library/unittest.rst
+++ b/Doc/library/unittest.rst
@@ -1870,9 +1870,10 @@ Loading and running tests
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 @@ Loading and running tests
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 @@ Loading and running tests
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, \