Exirel/python-xmlunittest — pull request #2 by glenfant (2013-12-05 17:40:22+00:00)
Title: Adding XML comparison, and Schema compliance assertions

Hi,

I'm actually tech leading a big ESB project that plays intensively with XML techs including XML databases.
Many thanks for your python-xmlunittest that helped me to make tests less noisy than they used to be.
I added two assertions from my project testing resources I use intensively and I think may be valuable for python-xmlunittest users:

- assertXmlEquivalent(got, expect)

This method compares "got" (as XML text or as Element node) with "expect" as XML text. Extra or missing meaningless space characters are ignored, attribute orders may differ, and namespace prefixes may differ too (see the tests)

- assertXmlValid(got, schema)

This method checks "got" (as XML text or element node) for compliance with "schema". Schema may be any schema object (DTD, XSchema RelaxNG, ...) lxml can handle.

See the details in the updated documentation and test.py.

Ah and sorry for some invisible diffs due to my text editor that removes trailing blank characters when saving.