unittest.expectedFailure not treated as unexpectedsuccess

Bug #1417803 reported by Leah Klearman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
testtools
Incomplete
High
Unassigned

Bug Description

when running "testr run --subunit -- <tests> | <my parser>"

in show_outcome() implemented by my parser, the test['status'] is failed, not uxsuccess

The test class inherits from testtools.TestCase, and the test method was marked with @unittest.expectedFailure

Revision history for this message
Leah Klearman (lklrmn) wrote :

turns out that it works as desired when using @unittest2.expectedFailure

summary: - test status being changed from uxsuccess to failed
+ unittest.expectedFailure not treated as unexpectedsuccess
affects: testrepository → testtools
Changed in testtools:
status: New → Triaged
importance: Undecided → High
Revision history for this message
Jonathan Lange (jml) wrote :

"unittest.expectedFailure not treated as unexpectedsuccess" confuses me a bit. Guessing it means that tests which are decorated with "unittest.expectedFailure" and _pass_ are not treated as unexpectedsuccess.

Revision history for this message
Leah Klearman (lklrmn) wrote : Re: [Bug 1417803] Re: unittest.expectedFailure not treated as unexpectedsuccess

yes, and it's an interoperability problem with the *unittest* decorator, as
opposed to unittest2 and/or whatever testtools provides.

On Thu, Nov 19, 2015 at 5:56 AM, Jonathan Lange <email address hidden> wrote:

> "unittest.expectedFailure not treated as unexpectedsuccess" confuses me
> a bit. Guessing it means that tests which are decorated with
> "unittest.expectedFailure" and _pass_ are not treated as
> unexpectedsuccess.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1417803
>
> Title:
> unittest.expectedFailure not treated as unexpectedsuccess
>
> Status in testtools:
> Triaged
>
> Bug description:
> when running "testr run --subunit -- <tests> | <my parser>"
>
> in show_outcome() implemented by my parser, the test['status'] is
> failed, not uxsuccess
>
> The test class inherits from testtools.TestCase, and the test method
> was marked with @unittest.expectedFailure
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/testtools/+bug/1417803/+subscriptions
>

Revision history for this message
Jonathan Lange (jml) wrote :

Ah, gotcha. Would you mind providing a minimal example test and a minimal example parser?

Changed in testtools:
status: Triaged → Incomplete
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.