New versions of lxml break assert_xml_equal

Bug #1227960 reported by Michele Simionato
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Natural hazards' Risk Markup Language (NRML)
Fix Committed
High
Michele Simionato

Bug Description

In the tests of nrmllib we compare for equality two XML files with the function assert_xml_equal. Two files with the same attributes in different order should be considered equal. The current implementation checks the equality by using etree.tostring, which reorders the attributes. However such feature has been removed in new versions of lxml (now the original order of the attributes is preserved) so assert_xml_equal is no more suitable for its intended purpose. The solution is to use nrmllib.writers.tostring which does the right thing.

Revision history for this message
Michele Simionato (michele-simionato) wrote :
Changed in oq-nrmllib:
status: New → In Progress
importance: Undecided → High
assignee: nobody → Michele Simionato (michele-simionato)
description: updated
Changed in oq-nrmllib:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.