summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorMichael Foord <fuzzyman@voidspace.org.uk>2009-05-02 22:43:34 (GMT)
committerMichael Foord <fuzzyman@voidspace.org.uk>2009-05-02 22:43:34 (GMT)
commit07ef487a96b826584f7871629c4cc4754e41242b (patch)
tree8c41c3adc7021d39841b87ffaf44afecc50794b1 /Doc
parent7430989cdadfb5aacef6909a3e2c033a0209699b (diff)
downloadcpython-07ef487a96b826584f7871629c4cc4754e41242b.zip
cpython-07ef487a96b826584f7871629c4cc4754e41242b.tar.gz
cpython-07ef487a96b826584f7871629c4cc4754e41242b.tar.bz2
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/unittest.rst14
-rw-r--r--Doc/whatsnew/2.7.rst4
2 files changed, 18 insertions, 0 deletions
diff --git a/Doc/library/unittest.rst b/Doc/library/unittest.rst
index b8aed9b..e1d416d 100644
--- a/Doc/library/unittest.rst
+++ b/Doc/library/unittest.rst
@@ -1318,6 +1318,20 @@ Loading and running tests
The default implementation does nothing.
+ .. method:: startTestRun(test)
+
+ Called once before any tests are executed.
+
+ .. versionadded:: 2.7
+
+
+ .. method:: stopTestRun(test)
+
+ Called once before any tests are executed.
+
+ .. versionadded:: 2.7
+
+
.. method:: addError(test, err)
Called when the test case *test* raises an unexpected exception *err* is a
diff --git a/Doc/whatsnew/2.7.rst b/Doc/whatsnew/2.7.rst
index 3243c0a..9182c453 100644
--- a/Doc/whatsnew/2.7.rst
+++ b/Doc/whatsnew/2.7.rst
@@ -517,6 +517,10 @@ changes, or look through the Subversion logs for all the details.
If False ``main`` doesn't call :func:`sys.exit` allowing it to
be used from the interactive interpreter. :issue:`3379`.
+ :class:`TestResult` has new :meth:`startTestRun` and
+ :meth:`stopTestRun` methods; called immediately before
+ and after a test run. :issue:`5728` by Robert Collins.
+
* The :func:`is_zipfile` function in the :mod:`zipfile` module will now
accept a file object, in addition to the path names accepted in earlier
versions. (Contributed by Gabriel Genellina; :issue:`4756`.)