zope.testrunner does not handle unexpected test successes but it claims to do so

Bug #719369 reported by Michael Howitz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
zope.testing
Fix Released
Undecided
Michael Howitz
zope.testrunner
Fix Released
Undecided
Michael Howitz

Bug Description

Python 2.7 added the concept of expectedFailures to unittest.
See http://www.voidspace.org.uk/python/articles/unittest2.shtml#more-skipping

When a test decorated with @unittest.expectedFailure does not raise an exception this test is counted as success when running the tests with zope.testrunner.

It should be handled separately besides failures and errors.

Meanwhile `addUnexpectedSuccess` could be set to None on zope.testrunner.runner.TestResult. Although this produces a Warning it counts the unexpected success as failure. So it does not get counted as success as currently.

Revision history for this message
Michael Howitz (mh-gocept) wrote :

Released in zope.testing 3.9.6 resp. zope.testrunner 4.0.1

Changed in zope.testing:
assignee: nobody → Michael Howitz (mh-gocept)
status: New → Fix Released
Changed in zope.testrunner:
assignee: nobody → Michael Howitz (mh-gocept)
status: New → Fix Released
Revision history for this message
Lennart Regebro (regebro-gmail) wrote :

Setting addUnexpectedSuccess to None gives you a completely misleading and useless error message, as the message you get is "TypeError: 'NoneType' object is not callable". I'll revert this change.

Revision history for this message
Michael Howitz (mh-gocept) wrote : Re: [Bug 719369] Re: zope.testrunner does not handle unexpected test successes but it claims to do so

Am 14.03.2011 um 20:00 schrieb Lennart Regebro:
> Setting addUnexpectedSuccess to None gives you a completely misleading
> and useless error message, as the message you get is "TypeError:
> 'NoneType' object is not callable". I'll revert this change.

Which Python version do you use?
Python 2.7 has a test to show at behaves correct with the fix.

Yours sincerely,
--
Michael Howitz · <email address hidden> · software developer
gocept gmbh & co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 8 · fax +49 345 1229889 1
Zope and Plone consulting and development

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.