Skip to content

Instantly share code, notes, and snippets.

@hackebrot
Last active August 5, 2016 17:35
Show Gist options
  • Save hackebrot/3a08741ba73922076d3c34f643dab5f4 to your computer and use it in GitHub Desktop.
Save hackebrot/3a08741ba73922076d3c34f643dab5f4 to your computer and use it in GitHub Desktop.
1546
elif call.when == "call":
strict_default = item.config.getini('xfail_strict')
is_strict_xfail = evalxfail.get('strict', strict_default)
# TODO: xpass outcome
if is_strict_xfail:
rep.outcome = "failed"
else:
rep.outcome = "passed"
rep.wasxfail = evalxfail.getexplanation()
...
# called by terminalreporter progress reporting
def pytest_report_teststatus(report):
if hasattr(report, "wasxfail"):
if report.skipped:
return "xfailed", "x", "xfail"
elif report.passed:
return "xpassed", "X", ("XPASS", {'yellow': True})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment