[PATCH 11 of 17 seda] [py3] Sort list of dicts by items in assertXSDAttributes

Denis Laxalde denis.laxalde at logilab.fr
Wed Oct 2 16:06:39 CEST 2019


Apparently, this is what python2 does.

diff --git a/test/test_profile_generation.py b/test/test_profile_generation.py
index 59be6e5..f0964bd 100644
--- a/test/test_profile_generation.py
+++ b/test/test_profile_generation.py
@@ -202,7 +202,7 @@ class RelaxNGTestMixin(XmlTestMixin):
                 adef['type'] = 'xsd:' + data_elements[0].attrib['type']
             self._element_fixed_value(adef, adef_element)
             adefs.append(adef)
-        return sorted(adefs)
+        return sorted(adefs, key=lambda d: list(d.items()))
 
     def _element_fixed_value(self, edef, element):
         values = self.xpath(element, 'rng:value')



More information about the saem-devel mailing list