提交 38d8fd06 编写于 作者: C Cleber Rosa

selftests/unit/test_xunit.py: also output schema validation errors

It's useful to show the schema validation errors when invalid output
is produced.
Signed-off-by: NCleber Rosa <crosa@redhat.com>
上级 e145ec0e
......@@ -91,8 +91,8 @@ class xUnitSucceedTest(unittest.TestCase):
xmlschema = etree.XMLSchema(etree.parse(f)) # pylint: disable=I1101
# pylint: disable=I1101
self.assertTrue(xmlschema.validate(etree.parse(BytesIO(xml))),
"Failed to validate against %s, content:\n%s" %
(self.junit, xml))
"Failed to validate against %s, content:\n%s\nerror log:\n%s" %
(self.junit, xml, xmlschema.error_log))
def test_max_test_log_size(self):
log = tempfile.NamedTemporaryFile(dir=self.tmpdir, delete=False)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册