summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2020-11-18 22:37:37 (GMT)
committerGitHub <noreply@github.com>2020-11-18 22:37:37 (GMT)
commitf9fa920c30326050a7096c5cb3594465d1e75ff2 (patch)
tree6c6e437cc6eaaf5a0655c6b1cc7086ce9ba6b765 /Doc
parent37f6fe2c935a57cd1bd42c773aba255d8134cb61 (diff)
downloadcpython-f9fa920c30326050a7096c5cb3594465d1e75ff2.zip
cpython-f9fa920c30326050a7096c5cb3594465d1e75ff2.tar.gz
cpython-f9fa920c30326050a7096c5cb3594465d1e75ff2.tar.bz2
[3.9] bpo-38320: Clarify that expectedFailure is satisfied by either failure or error of the test. (GH-22740) (GH-22783)
(cherry picked from commit fa8748271a61177e9bf609921fa464cc6990478b) Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/unittest.rst11
1 files changed, 6 insertions, 5 deletions
diff --git a/Doc/library/unittest.rst b/Doc/library/unittest.rst
index 8a4fd25..523e0e6 100644
--- a/Doc/library/unittest.rst
+++ b/Doc/library/unittest.rst
@@ -593,8 +593,9 @@ The following decorators and exception implement test skipping and expected fail
.. decorator:: expectedFailure
- Mark the test as an expected failure. If the test fails it will be
- considered a success. If the test passes, it will be considered a failure.
+ Mark the test as an expected failure or error. If the test fails or errors
+ it will be considered a success. If the test passes, it will be considered
+ a failure.
.. exception:: SkipTest(reason)
@@ -1946,7 +1947,7 @@ Loading and running tests
A list containing 2-tuples of :class:`TestCase` instances and strings
holding formatted tracebacks. Each tuple represents an expected failure
- of the test case.
+ or error of the test case.
.. attribute:: unexpectedSuccesses
@@ -2072,8 +2073,8 @@ Loading and running tests
.. method:: addExpectedFailure(test, err)
- Called when the test case *test* fails, but was marked with the
- :func:`expectedFailure` decorator.
+ Called when the test case *test* fails or errors, but was marked with
+ the :func:`expectedFailure` decorator.
The default implementation appends a tuple ``(test, formatted_err)`` to
the instance's :attr:`expectedFailures` attribute, where *formatted_err*