[PATCH eac] Fix error on extid comparison on tests

Guillaume Vandevelde guillaume.vandevelde at logilab.fr
Tue Sep 3 11:33:41 CEST 2019


# HG changeset patch
# User Guillaume Vandevelde <gvandevelde at logilab.fr>
# Date 1567502975 -7200
#      Tue Sep 03 11:29:35 2019 +0200
# Node ID 7e0248b5fe8f3b01eb44a820b8d3ee196a3c84a8
# Parent  529f93fa0fee289de55b2c6fea3639a049725107
# Available At http://hg.logilab.org/review/cubes/eac
#              hg pull http://hg.logilab.org/review/cubes/eac -r 7e0248b5fe8f
Fix error on extid comparison on tests

Some tests didn't pass because of some set comparison. Fixed it
by comparing a sorted list representation of this set.
This error happening only on one entity, there is certainly more
about it that should be investigated.

diff -r 529f93fa0fee -r 7e0248b5fe8f test/test_dataimport.py
--- a/test/test_dataimport.py	Thu Aug 08 18:46:19 2019 +0200
+++ b/test/test_dataimport.py	Tue Sep 03 11:29:35 2019 +0200
@@ -795,7 +795,8 @@
                             ctx='%s/extids' % etype)
             for extid, values in edict.items():
                 self.ctx_assert('assertEqual',
-                                tolist(entities_etype[extid]), tolist(values),
+                                sorted(tolist(entities_etype[extid])),
+                                sorted(tolist(values)),
                                 ctx='%s/%s/values' % (etype, extid))
 
     def test_errors(self):



More information about the saem-devel mailing list