folding KnownFailure to success loses data
Bug #409193 reported by
Martin Pool
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
subunit |
Fix Released
|
Wishlist
|
Robert Collins |
Bug Description
subunit folds KnownFailure (and maybe skip or others?) to be treated as success. This loses information, specifically the error/traceback, which would be highly useful in determining just what went wrong. This slightly blocks fixing bug 408821 because it's the skipped tests that I most want to match.
Related branches
lp:~lifeless/subunit/xfail
- Jonathan Lange: Approve
- Diff: None lines
Changed in subunit: | |
assignee: | nobody → Robert Collins (lifeless) |
importance: | Undecided → Wishlist |
status: | New → Fix Committed |
Changed in subunit: | |
status: | Fix Committed → Fix Released |
Changed in subunit: | |
status: | Fix Committed → Fix Released |
milestone: | none → 0.0.2 |
To post a comment you must log in.
This is pretty shallow:
=== modified file 'python/ subunit/ __init_ _.py' subunit/ __init_ _.py 2009-08-02 22:55:36 +0000 subunit/ __init_ _.py 2009-08-05 07:10:15 +0000
self. current_ test_descriptio n == line[offset:-1]):
self. state = TestProtocolSer ver.OUTSIDE_ TEST
self. current_ test_descriptio n = None addSuccess( self._current_ test) self.client, 'addExpectedFai lure', None) _current_ test, RemoteError()) addSuccess( self._current_ test)
self. client. stopTest( self._current_ test) ver.TEST_ STARTED and
self. current_ test_descriptio n + " [" == line[offset:-1]):
self. current_ test_descriptio n = None
self. _skip_or_ error(self. _message)
self. client. stopTest( self._current_ test) ver.READING_ SUCCESS, ver.READING_ XFAIL, ver.READING_ XFAIL: ver.OUTSIDE_ TEST test_descriptio n = None self.client, 'addExpectedFai lure', None) _current_ test, RemoteError( self._message) ) addSuccess( self._current_ test) stopTest( self._current_ test) ver.READING_ SUCCESS:
self. _succeedTest( )
self. stdOutLineRecei ved(line)
--- python/
+++ python/
@@ -120,7 +120,11 @@
- self.client.
+ xfail = getattr(
+ if callable(xfail):
+ xfail(self.
+ else:
+ self.client.
elif (self.state == TestProtocolSer
@@ -203,10 +207,16 @@
- elif self.state in (
- TestProtocolSer
- TestProtocolSer
- ):
+ elif self.state == TestProtocolSer
+ self.state = TestProtocolSer
+ self.current_
+ xfail = getattr(
+ if callable(xfail):
+ xfail(self.
+ else:
+ self.client.
+ self.client.
+ elif self.state == TestProtocolSer
else:
(tests not done, but this should unblock you)