Commit 6c200ff1 authored by norvell's avatar norvell
Browse files

Add handling of xfail

parent 9a338f00
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -456,7 +456,9 @@ def pytest_runtest_makereport(item, call):

    if call.excinfo is not None and report.when == "call":
        # Make sure exception is not due to a skipped or failed test (allowed exceptions)
        if call.excinfo.type not in [Skipped, Failed]:
        type = call.excinfo.type
        xfail = hasattr(report, "wasxfail")
        if type not in [Skipped, Failed] and not xfail:
            # Capture exception in test_info
            test_info.error = str(call.excinfo.value)