Merge lp:~elopio/pyjunitxml/skip into lp:pyjunitxml

Proposed by Leo Arias
Status: Merged
Merged at revision: 25
Proposed branch: lp:~elopio/pyjunitxml/skip
Merge into: lp:pyjunitxml
Diff against target: 34 lines (+3/-3)
2 files modified
junitxml/__init__.py (+1/-1)
junitxml/tests/test_junitxml.py (+2/-2)
To merge this branch: bzr merge lp:~elopio/pyjunitxml/skip
Reviewer Review Type Date Requested Status
Robert Collins Pending
Review via email: mp+82729@code.launchpad.net

Commit message

Replace 'skip' by 'skipped' in the xml file, as it seems to be the standard tag.

Description of the change

Our Jenkins tests were not reporting the skipped tests. After searching a specification for the results file, I found nothing but it seemed that it was based on the report made by the ant task, and it uses 'skipped' as the tag, instead of the 'skip' that's being generated by junitxml.

I tried replacing the tag by 'skipped', and Jenkins successfully reported the skipped tests.

So, this branch replaces 'skip' by 'skipped', as it seems to be the standard tag.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'junitxml/__init__.py'
2--- junitxml/__init__.py 2010-09-11 22:36:30 +0000
3+++ junitxml/__init__.py 2011-11-18 18:56:25 +0000
4@@ -198,7 +198,7 @@
5 pass
6 self._test_case_string(test)
7 self._results.append('>\n')
8- self._results.append('<skip>%s</skip>\n</testcase>\n'% _escape_attr(reason))
9+ self._results.append('<skipped>%s</skipped>\n</testcase>\n'% _escape_attr(reason))
10
11 def addUnexpectedSuccess(self, test):
12 try:
13
14=== modified file 'junitxml/tests/test_junitxml.py'
15--- junitxml/tests/test_junitxml.py 2010-09-11 22:32:51 +0000
16+++ junitxml/tests/test_junitxml.py 2011-11-18 18:56:25 +0000
17@@ -155,7 +155,7 @@
18 output = self.get_output()
19 expected = """<testsuite errors="0" failures="0" name="" tests="1" time="0.000">
20 <testcase classname="junitxml.tests.test_junitxml.Skips" name="test_me" time="0.000">
21-<skip>yo</skip>
22+<skipped>yo</skipped>
23 </testcase>
24 </testsuite>
25 """
26@@ -262,7 +262,7 @@
27 doc = self._run_and_parse_test(SkipWithLt())
28 if self.has_skip:
29 self.assertEqual('2.7 <= version',
30- doc.getElementsByTagName("skip")[0].firstChild.nodeValue)
31+ doc.getElementsByTagName("skipped")[0].firstChild.nodeValue)
32 else:
33 self.assertTrue(
34 doc.getElementsByTagName("failure")[0].firstChild.nodeValue

Subscribers

People subscribed via source and target branches

to all changes: