--- a/cubicweb/test/unittest_predicates.py Mon Mar 14 18:15:09 2016 +0100
+++ b/cubicweb/test/unittest_predicates.py Thu Mar 03 10:25:32 2016 +0100
@@ -327,7 +327,8 @@
for (expected, operator, assertion) in testdata:
selector = multi_lines_rset(expected, operator)
- yield self.assertEqual, selector(None, req, rset=rset), assertion
+ with self.subTest(expected=expected, operator=operator):
+ self.assertEqual(selector(None, req, rset=rset), assertion)
class MatchKwargsTC(TestCase):
--- a/cubicweb/web/test/unittest_application.py Mon Mar 14 18:15:09 2016 +0100
+++ b/cubicweb/web/test/unittest_application.py Thu Mar 03 10:25:32 2016 +0100
@@ -527,10 +527,9 @@
"""test against current script injection"""
injected = '<i>toto</i>'
cleaned = 'toto'
- for kwargs in ({'vid': injected},
- {'vtitle': injected},
- ):
- yield self._test_cleaned, kwargs, injected, cleaned
+ for kwargs in ({'vid': injected}, {'vtitle': injected}):
+ with self.subTest(**kwargs):
+ self._test_cleaned(kwargs, injected, cleaned)
def test_site_wide_eproperties_sync(self):
# XXX work in all-in-one configuration but not in twisted for instance