Commit 200bb85b authored by Jérome Perrin's avatar Jérome Perrin

CodingStyleTestCase: use standard unittest error reporting

It produces almost same visual result
parent 9285a796
...@@ -91,10 +91,7 @@ class CodingStyleTestCase(ERP5TypeTestCase): ...@@ -91,10 +91,7 @@ class CodingStyleTestCase(ERP5TypeTestCase):
search_sub=True): search_sub=True):
if getattr(aq_base(document), 'checkConsistency', None) is not None: if getattr(aq_base(document), 'checkConsistency', None) is not None:
message_list.extend(document.checkConsistency()) message_list.extend(document.checkConsistency())
self.assertEqual([], message_list)
# Return results
if len(message_list):
raise self.failureException('\n'.join(map(lambda x: repr(x), message_list)))
def test_PythonSourceCode(self): def test_PythonSourceCode(self):
"""test python script from the tested business templates. """test python script from the tested business templates.
...@@ -108,4 +105,3 @@ class CodingStyleTestCase(ERP5TypeTestCase): ...@@ -108,4 +105,3 @@ class CodingStyleTestCase(ERP5TypeTestCase):
for business_template in self.portal.portal_templates.contentValues(): for business_template in self.portal.portal_templates.contentValues():
if business_template.getTitle() in self.getTestedBusinessTemplateList(): if business_template.getTitle() in self.getTestedBusinessTemplateList():
self.assertEqual([], business_template.BusinessTemplate_getPythonSourceCodeMessageList()) self.assertEqual([], business_template.BusinessTemplate_getPythonSourceCodeMessageList())
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment