#1467: fix documentation for TestResult.add{Error,Failure}.

This commit is contained in:
Georg Brandl 2007-11-24 11:39:13 +00:00
parent 439f250c00
commit 586edab279
1 changed files with 6 additions and 4 deletions

View File

@ -814,8 +814,9 @@ tools which support interactive reporting while tests are being run.
Called when the test case *test* raises an unexpected exception *err* is a tuple Called when the test case *test* raises an unexpected exception *err* is a tuple
of the form returned by :func:`sys.exc_info`: ``(type, value, traceback)``. of the form returned by :func:`sys.exc_info`: ``(type, value, traceback)``.
The default implementation appends ``(test, err)`` to the instance's ``errors`` The default implementation appends a tuple ``(test, formatted_err)`` to the
attribute. instance's ``errors`` attribute, where *formatted_err* is a formatted
traceback derived from *err*.
.. method:: TestResult.addFailure(test, err) .. method:: TestResult.addFailure(test, err)
@ -823,8 +824,9 @@ tools which support interactive reporting while tests are being run.
Called when the test case *test* signals a failure. *err* is a tuple of the form Called when the test case *test* signals a failure. *err* is a tuple of the form
returned by :func:`sys.exc_info`: ``(type, value, traceback)``. returned by :func:`sys.exc_info`: ``(type, value, traceback)``.
The default implementation appends ``(test, err)`` to the instance's The default implementation appends a tuple ``(test, formatted_err)`` to the
``failures`` attribute. instance's ``failures`` attribute, where *formatted_err* is a formatted
traceback derived from *err*.
.. method:: TestResult.addSuccess(test) .. method:: TestResult.addSuccess(test)