Author Kit Choi2
Recipients Kit Choi2, docs@python
Date 2019-09-30.09:14:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1569834841.91.0.690142859839.issue38320@roundup.psfhosted.org>
In-reply-to
Content
Following discussion in https://bugs.python.org/issue38296

The docstring of unittest.expectedFailure is misleading for people who differentiate "error" and "failure" when they read the sentence. This has a consequence of developers using the decorator without noticing unexpected errors are also silenced, which mean running a risk of their tests becoming unmaintained and invalid in the future.

I suggest updating the documentation to include a mention of the current behaviour of silencing unexpected errors, so that developers are aware of this.

Something like this?:

Mark the test such that unexpected success results in a failure. If an exception (BaseException excluding KeyboardInterrupt) occurs, the test will be considered a success. If the test passes, it will be considered a failure.
History
Date User Action Args
2019-09-30 09:14:01Kit Choi2setrecipients: + Kit Choi2, docs@python
2019-09-30 09:14:01Kit Choi2setmessageid: <1569834841.91.0.690142859839.issue38320@roundup.psfhosted.org>
2019-09-30 09:14:01Kit Choi2linkissue38320 messages
2019-09-30 09:14:01Kit Choi2create