[test] Don't depend on dict iteration ordering
authorJulien Cristau <julien.cristau@logilab.fr>
Fri, 13 Feb 2015 14:34:35 +0100
changeset 10252 3b89cfd010a6
parent 10251 2daa5c6dea4d
child 10253 8eb9a3e9531c
[test] Don't depend on dict iteration ordering Fixes test with python -R. Related to #4959402.
test/unittest_schema.py
--- a/test/unittest_schema.py	Fri Feb 13 14:32:15 2015 +0100
+++ b/test/unittest_schema.py	Fri Feb 13 14:34:35 2015 +0100
@@ -360,8 +360,8 @@
                          schema['produces_and_buys'].rdefs.keys())
         self.assertEqual([('Person','Service')],
                          schema['produces_and_buys2'].rdefs.keys())
-        self.assertEqual([('Company', 'Service'), ('Person', 'Service')],
-                         schema['reproduce'].rdefs.keys())
+        self.assertCountEqual([('Company', 'Service'), ('Person', 'Service')],
+                              schema['reproduce'].rdefs.keys())
         # check relation definitions are marked infered
         rdef = schema['produces_and_buys'].rdefs[('Person','Service')]
         self.assertTrue(rdef.infered)