Merge lp:~gz/pyjunitxml/ensure_well_formed_xml_625589 into lp:pyjunitxml
Status: | Merged |
---|---|
Merged at revision: | 21 |
Proposed branch: | lp:~gz/pyjunitxml/ensure_well_formed_xml_625589 |
Merge into: | lp:pyjunitxml |
Diff against target: |
275 lines (+181/-9) (has conflicts) 2 files modified
junitxml/__init__.py (+57/-9) junitxml/tests/test_junitxml.py (+124/-0) Text conflict in junitxml/__init__.py Text conflict in junitxml/tests/test_junitxml.py |
To merge this branch: | bzr merge lp:~gz/pyjunitxml/ensure_well_formed_xml_625589 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Robert Collins | Needs Fixing | ||
Vincent Ladeuil | Approve | ||
Review via email:
|
Description of the change
Fixes the escaping function to be properly robust against arbitrary input, and to output utf-8 bytestrings on Python 2.
There are a couple of judgement calls in how this escaping is written. Firstly, invalid cdata is stripped rather than included in some escaped form in the output. Without resorting to clever things that would require the junit xml format there's always the potential for confusing output like "AssertionError: '' != ''" but that's not much worse than "AssertionError: '\x00' != '\x00'" or similar. Also, \r is stripped even though it may appear in xml content, this is largely because of how parsing handles it anyway.
This branch builds on lp:~gz/pyjunitxml/unexpected_expectations_python_2.7 and p:~gz/pyjunitxm
Woohoo ! Makes babune happy :-)
First time we get an actual Test Result, compare: babune. ladeuil. net:24842/ job/selftest- windows/ 153/ babune. ladeuil. net:24842/ job/selftest- windows/ 154/
http://
with
http://
I will be running with this branch for all other platforms to check
against regressions.