This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients dfrojas, eli.bendersky, nedbat, rhettinger, scoder, serhiy.storchaka, taleinat, vstinner
Date 2018-11-10.16:05:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1541865907.36.0.788709270274.issue34160@psf.upfronthosting.co.za>
In-reply-to
Content
> I'm checking that my XML generating code is producing the right XML.

ISTM that the coverage tests as currently written aren't good tests.  Why not update the tests to check the generated XML is what the code asked it to generate?  Otherwise, the tests are relying on a non-guaranteed implementation detail. 

Alternatively, use c14n.Canonicalize[1] which implements standard compliant cross-language canonicalization (as opposed to non-guaranteed ad-hoc comparison which just happens to work).

[1] https://www.ibm.com/developerworks/xml/library/x-c14n/

Note with attribute order preservation, code now has the ability to produce exactly the XML it wants to produce.  The explicit intention of the user is honored.
History
Date User Action Args
2018-11-10 16:05:07rhettingersetrecipients: + rhettinger, scoder, vstinner, taleinat, nedbat, eli.bendersky, serhiy.storchaka, dfrojas
2018-11-10 16:05:07rhettingersetmessageid: <1541865907.36.0.788709270274.issue34160@psf.upfronthosting.co.za>
2018-11-10 16:05:07rhettingerlinkissue34160 messages
2018-11-10 16:05:07rhettingercreate