Fix pytest junitxml output processing for make check
Not every element tagged `skipped` in the JUnitXML tree has to contain the `type` attribute. An example of that is a test that results in xpass. This has been verified with pytest version 7.4.2 and prior.
This commit is contained in:
@@ -34,7 +34,7 @@ def junit_to_trs(junit_xml):
|
||||
res = "ERROR"
|
||||
has_error = True
|
||||
elif node.tag == "skipped":
|
||||
if node.attrib["type"] == "pytest.xfail":
|
||||
if node.attrib.get("type") == "pytest.xfail":
|
||||
res = "XFAIL"
|
||||
else:
|
||||
res = "SKIP"
|
||||
|
||||
Reference in New Issue
Block a user