expected failures should not be seen as failures

Bug #506340 reported by Vincent Ladeuil
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pyjunitxml
Fix Released
Critical
Martin Packman

Bug Description

I need to use the following patch or using subunit2junitxml just doesn't work with hudson: the expected failures are seen as true failures which is not good (tm).

=== modified file 'junitxml/__init__.py'
--- junitxml/__init__.py 2010-01-12 10:26:29 +0000
+++ junitxml/__init__.py 2010-01-12 10:30:45 +0000
@@ -163,5 +163,5 @@
             pass
         self._test_case_string(test)
         self._results.append('>\n')
- self._results.append('<failure type="%s.%s">%s</failure>\n</testcase>\n'% (escape(error[0].__module__), escape(error[0].__name__), escape(self._exc_info_to_string(error, test))))
-
+ self._results.append('<xfail>%s</xfail>\n</testcase>\n'%
+ escape(self._exc_info_to_string(error, test)))

Related branches

Revision history for this message
Robert Collins (lifeless) wrote :

Need to find out what junit's native XML contains for an expected failure.

Changed in pyjunitxml:
status: New → Triaged
importance: Undecided → Critical
Revision history for this message
Robert Collins (lifeless) wrote :

Martins fix makes this a success, which is ok even though a little imprecise.

Changed in pyjunitxml:
assignee: nobody → Martin [gz] (gz)
milestone: none → next
status: Triaged → Fix Released
Revision history for this message
Martin Packman (gz) wrote :

Right, I couldn't find much info about how accepting of format changes junit things are, so it seemed falling back to success was a safer first step than inventing a new tag. We could easily extend the schema to include more result types like xfail later if that turns out to be acceptable.

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.