Terry J. Reedy <tjre...@udel.edu> added the comment:
A test either passes or fails. Like a not operator, the expectedFailure decorator inverts the result. https://docs.python.org/3/library/unittest.html#unittest.expectedFailure @unittest.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. By itself, your 'test' method fails. Decorated, it should and does pass. As you suggested, using expectedFailure is a blunt instrument that can be misleading if not used carefully and not reviewed when editing the module tested. It is only used 7 times in test_xyz.py modules in the lib/test directory and subdirectories. ---------- nosy: +ezio.melotti, michael.foord versions: -Python 3.5, Python 3.6 _______________________________________ 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