##// END OF EJS Templates
run-tests: add information about skipped tests to XUnit output...
Siddharth Agarwal -
r32715:a4d0e816 default
parent child Browse files
Show More
@@ -2061,6 +2061,17 b' class TextTestRunner(unittest.TextTestRu'
2061 failelem.appendChild(cd)
2061 failelem.appendChild(cd)
2062 t.appendChild(failelem)
2062 t.appendChild(failelem)
2063 s.appendChild(t)
2063 s.appendChild(t)
2064 for tc, message in result.skipped:
2065 # According to the schema, 'skipped' has no attributes. So store
2066 # the skip message as a text node instead.
2067 t = doc.createElement('testcase')
2068 t.setAttribute('name', tc.name)
2069 message = cdatasafe(message).decode('utf-8', 'replace')
2070 cd = doc.createCDATASection(message)
2071 skipelem = doc.createElement('skipped')
2072 skipelem.appendChild(cd)
2073 t.appendChild(skipelem)
2074 s.appendChild(t)
2064 outf.write(doc.toprettyxml(indent=' ', encoding='utf-8'))
2075 outf.write(doc.toprettyxml(indent=' ', encoding='utf-8'))
2065
2076
2066 @staticmethod
2077 @staticmethod
@@ -676,6 +676,10 b' Skips with xml'
676 <?xml version="1.0" encoding="utf-8"?>
676 <?xml version="1.0" encoding="utf-8"?>
677 <testsuite errors="0" failures="0" name="run-tests" skipped="2" tests="2">
677 <testsuite errors="0" failures="0" name="run-tests" skipped="2" tests="2">
678 <testcase name="test-success.t" time="*"/> (glob)
678 <testcase name="test-success.t" time="*"/> (glob)
679 <testcase name="test-skip.t">
680 <skipped>
681 <![CDATA[missing feature: nail clipper]]> </skipped>
682 </testcase>
679 </testsuite>
683 </testsuite>
680
684
681 Missing skips or blacklisted skips don't count as executed:
685 Missing skips or blacklisted skips don't count as executed:
General Comments 0
You need to be logged in to leave comments. Login now