Hello all,

I have the following issue with generated junitxml reports:

I'm writing test cases which use scapy functions. So I make asserts on
some packet objects. As I understand scapy uses esc characters for its
own objects representation, and I can see colorful output on the
console. But when test is failed, and its traceback went to xml, I
can't open generated xml due to the error "XML Parsing Error: not
well-formed" In my case the problem with esc charecter 033 (\x1b).
I resolved the issue by adding the following code to append_failure
method in LogXML class:
longrepr = str(report.longrepr).replace('\x1b', '\\033')
fail.append(longrepr)

I think that it will be good if you add some cleanup functions to
avoid such situations.

Thank you,

-Anton
_______________________________________________
py-dev mailing list
py-dev@codespeak.net
http://codespeak.net/mailman/listinfo/py-dev

Reply via email to