Show More
@@ -2061,6 +2061,17 b' class TextTestRunner(unittest.TextTestRu' | |||
|
2061 | 2061 | failelem.appendChild(cd) |
|
2062 | 2062 | t.appendChild(failelem) |
|
2063 | 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 | 2075 | outf.write(doc.toprettyxml(indent=' ', encoding='utf-8')) |
|
2065 | 2076 | |
|
2066 | 2077 | @staticmethod |
@@ -676,6 +676,10 b' Skips with xml' | |||
|
676 | 676 | <?xml version="1.0" encoding="utf-8"?> |
|
677 | 677 | <testsuite errors="0" failures="0" name="run-tests" skipped="2" tests="2"> |
|
678 | 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 | 683 | </testsuite> |
|
680 | 684 | |
|
681 | 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