[PATCH 06 of 16 eac] [test] Avoid usage of ctx_assert for easier debugging

Denis Laxalde denis.laxalde at logilab.fr
Tue Oct 1 12:36:32 CEST 2019


# HG changeset patch
# User Denis Laxalde <denis.laxalde at logilab.fr>
# Date 1569919623 -7200
#      Tue Oct 01 10:47:03 2019 +0200
# Node ID 2fc2e95e0e78f174ade198802cfac042e1a350ba
# Parent  db5616fe9733d2250233ea7e3fdd8bb7f5916055
# Available At http://hg.logilab.org/review/cubes/eac
#              hg pull http://hg.logilab.org/review/cubes/eac -r 2fc2e95e0e78
[test] Avoid usage of ctx_assert for easier debugging

And use plain pytest's assert.

diff --git a/test/test_dataimport.py b/test/test_dataimport.py
index 74d98e5..adbdec6 100644
--- a/test/test_dataimport.py
+++ b/test/test_dataimport.py
@@ -447,9 +447,7 @@ class EACXMLParserTC(unittest.TestCase):
             self.ctx_assert('assertCountEqual', extids, expected_extids,
                             ctx='%s/extids' % etype)
             for extid, values in edict.items():
-                self.ctx_assert('assertEqual',
-                                tolist(entities_etype[extid]), tolist(values),
-                                ctx='%s/%s/values' % (etype, extid))
+                assert tolist(entities_etype[extid]) == tolist(values)
 
     def test_errors(self):
         log = SimpleImportLog('<dummy>')



More information about the saem-devel mailing list