One of our two test failures on Fedora 18 is this one:
FAIL: bkr.inttest.server.test_jobs:TestJobsController.test_job_xml_can_be_roundtripped
The reason is toprettyxml()'s behavior between Python 2.6 and Python 2.7. From an
example at [1], on Python 2.6:
>> from xml.dom import minidom
>> d =
minidom.parseString('<foo><bar>AAA</bar>BBB<bar>CCC</bar></foo>')
>> print d.toprettyxml()
<?xml version="1.0" ?>
<foo>
<bar>
AAA
</bar>
BBB
<bar>
CCC
</bar>
</foo>
And on Python 2.7:
>> from xml.dom import minidom
>> d =
minidom.parseString('<foo><bar>AAA</bar>BBB<bar>CCC</bar></foo>')
>> d.toprettyxml()
u'<?xml version="1.0"
?>\n<foo>\n\t<bar>AAA</bar>\n\tBBB\n\t<bar>CCC</bar>\n</foo>\n'
>> print d.toprettyxml()
<?xml version="1.0"
?>
<foo>
<bar>AAA</bar>
BBB
<bar>CCC</bar>
</foo>
I am not sure, but it looks like this is where the "fix" was committed in
2.7/3.x branches[2].
[1]
http://ronrothman.com/public/leftbraned/xml-dom-minidom-toprettyxml-and-s...
[2]
http://bugs.python.org/issue4147
At this moment, I am not sure what we can do about it, since changing our expected XML
file will break stuff on 2.6/RHEL6.
Best,
Amit.
--
Amit Saha <
http://echorand.me>
Infrastructure Engineering and Development
Red Hat, Inc.