New submission from Gregory P. Smith: Python 3.3.3+ (3.3:28337a8fb502+, Jan 7 2014, 01:32:44) [GCC 4.6.3] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import unittest >>> r = unittest.result.TestResult() >>> r.wasSuccessful() True >>> r.addUnexpectedSuccess("weird!") >>> r.wasSuccessful() True
An unexpected success is not a good thing and indicates a problem. the wasSuccessful() method should include a check for len(self.unexpectedSuccesses) == 0 as part of its condition. ---------- assignee: gregory.p.smith messages: 207582 nosy: gregory.p.smith priority: normal severity: normal stage: needs patch status: open title: unittest TestResult wasSuccessful returns True when there are unexpected successes type: behavior versions: Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue20165> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com