New submission from Kit Choi <k...@kychoi.org>:
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 ---------- components: Tests messages: 353382 nosy: Kit Choi priority: normal severity: normal status: open title: unittest expectedFailure does not differentiate errors from failures type: behavior versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue38296> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com