testr is inconsistent with testtools over unexpected successes
Bug #1429196 reported by
Chris Dent
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Testrepository |
Triaged
|
High
|
Unassigned |
Bug Description
The following simple test file, named uxsuccess.py demonstrates that subunit does not treat unexpected success as a failure:
-=-=-
import unittest
class MyTest(
@unittest.
def test_xfail(self):
@unittest.
def test_uxsuccess(
-=-=-
testtools does.
$ for i in testtools subunit ; do python -m $i.run uxsuccess.py &>/dev/null || echo "$i catches uxsuccess as fail" ; done
testtools catches uxsuccess as fail
To post a comment you must log in.
I see that I am wrong in my initial assumption about what subunit is doing. It exits with a 0 $? whether a test suite fails or succeeds, so that means the problem is in testrepository's interpretation of the subunit stream.
testr should be detecting uxsuccess as a failure code, but it does not.