Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions sphinxcontrib/test_reports/junitparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ def parse_testcase(xml_object):
# tc_dict["text"] = re.sub(r"[\n\t]*", "", result.text) # Removes newlines and tabs
tc_dict["text"] = result.text
tc_dict["message"] = ""
elif hasattr(testcase, "error"):
result = testcase.error
tc_dict["result"] = "error"
tc_dict["type"] = result.attrib.get("type", "unknown")
tc_dict["text"] = result.text or ""
tc_dict["message"] = ""
else:
tc_dict["result"] = "passed"
tc_dict["type"] = ""
Expand Down