This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Kit Choi
Recipients Kit Choi
Date 2019-09-27.17:26:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1569605169.32.0.911157248644.issue38296@roundup.psfhosted.org>
In-reply-to
Content
I expect the following test to fail, because an "error" is not a "failure".
Unexpectedly, the test passes:

```
class TestFailure(unittest.TestCase):

    @unittest.expectedFailure
    def test_expected_failure(self):
        raise TypeError()   # for example, a typo.
```

```
$ python -m unittest test_main
x
----------------------------------------------------------------------
Ran 1 test in 0.000s

OK (expected failures=1)
```

This behaviour exists since Python 2.7, and is still true for the Python 3.8.0b1
History
Date User Action Args
2019-09-27 17:26:09Kit Choisetrecipients: + Kit Choi
2019-09-27 17:26:09Kit Choisetmessageid: <1569605169.32.0.911157248644.issue38296@roundup.psfhosted.org>
2019-09-27 17:26:09Kit Choilinkissue38296 messages
2019-09-27 17:26:09Kit Choicreate