Author terry.reedy
Recipients Kit Yan Choi, chris.jerdonek, ezio.melotti, michael.foord, terry.reedy
Date 2019-09-28.18:29:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1569695380.23.0.399011373285.issue38296@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2019-09-28 18:29:40terry.reedysetrecipients: + terry.reedy, ezio.melotti, michael.foord, chris.jerdonek, Kit Yan Choi
2019-09-28 18:29:40terry.reedysetmessageid: <1569695380.23.0.399011373285.issue38296@roundup.psfhosted.org>
2019-09-28 18:29:40terry.reedylinkissue38296 messages
2019-09-28 18:29:40terry.reedycreate