Skip to content

Commit c334cd4

Browse files
committed
consider catch2's FAIL()
1 parent 0dedca1 commit c334cd4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/pytest_cpp/catch2.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,11 +199,12 @@ def _parse_xml(
199199
)
200200
)
201201
test_exception = test_case.findall(".//Exception")
202-
for exception in test_exception:
202+
test_failure = test_case.findall(".//Failure")
203+
for exception in (test_exception + test_failure):
203204
file_name = exception.attrib["filename"]
204205
line_num = int(exception.attrib["line"])
205206

206-
fail_msg = f"Error: {exception.text}"
207+
fail_msg = f"Error: {exception.text.strip()}"
207208
failures.append(
208209
(
209210
file_name,

0 commit comments

Comments
 (0)