[Python-checkins] [3.8] bpo-38320: Clarify that expectedFailure is satisfied by either failure or error of the test. (GH-22740) (GH-22782)

miss-islington webhook-mailer at python.org
Wed Nov 18 17:39:51 EST 2020


https://github.com/python/cpython/commit/5f463e501b9667d1059a1e916d59d19cdd6addf7
commit: 5f463e501b9667d1059a1e916d59d19cdd6addf7
branch: 3.8
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2020-11-18T14:39:42-08:00
summary:

[3.8] bpo-38320: Clarify that expectedFailure is satisfied by either failure or error of the test. (GH-22740) (GH-22782)



(cherry picked from commit fa8748271a61177e9bf609921fa464cc6990478b)


Co-authored-by: Irit Katriel <iritkatriel at yahoo.com>

files:
M Doc/library/unittest.rst

diff --git a/Doc/library/unittest.rst b/Doc/library/unittest.rst
index 7626a402f375f..d41ff1fa04248 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*



More information about the Python-checkins mailing list