pombreda / python-nose

Automatically exported from code.google.com/p/python-nose
0 stars 0 forks source link

XUnit plugin allows non UTF-8 charcters in XML report #395

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run the following test

def test():
   raise Exception, chr(128) 

What is the expected output? What do you see instead?

I expect a valid XUnit XML file to be generated. Hudson complians that the 
generated XML file contians non valid UTF-8 byte sequences.
I believe the non UTF-8 byte sequence in the exception needs to be 
encoded/escaped before inserting into the XML.

What version of the product are you using? On what operating system?
1.0.0

Please provide any additional information below.
None

Original issue reported on code.google.com by comber.b...@gmail.com on 2 Feb 2011 at 10:50

GoogleCodeExporter commented 9 years ago
A fix for this is in https://bitbucket.org/kumar303/nose

Could you try installing it to see if it's working for you?

pip install -e hg+https://bitbucket.org/kumar303/nose#egg=nose

Original comment by kumar.mcmillan on 2 Feb 2011 at 11:34

GoogleCodeExporter commented 9 years ago
Now every char above 127 in the error message is replaced with 3 chars [EF, BF, 
BD] which is the UTF-8 character replacement vector.

Hudson happily accepts this XML file as valid UTF-8

Original comment by comber.b...@gmail.com on 3 Feb 2011 at 6:45

GoogleCodeExporter commented 9 years ago

Original comment by kumar.mcmillan on 2 Mar 2011 at 8:56

GoogleCodeExporter commented 9 years ago
Fixed in revision b1c28905e6bd and will go out in 1.0.1

Original comment by kumar.mcmillan on 21 Mar 2011 at 4:13