Update sample.rst

This commit is contained in:
Yusuke Kadowaki 2022-11-28 00:22:10 +09:00
parent 1d4c83bd88
commit 9a69170ac7
1 changed files with 1 additions and 3 deletions

View File

@ -915,12 +915,10 @@ here is a little example implemented via a local plugin:
# request.node is an "item" because we use the default # request.node is an "item" because we use the default
# "function" scope # "function" scope
report = request.node.stash[phase_report_key] report = request.node.stash[phase_report_key]
if ("setup" not in report) or report["setup"].failed: if report["setup"].failed:
print("setting up a test failed or skipped", request.node.nodeid) print("setting up a test failed or skipped", request.node.nodeid)
elif ("call" not in report) or report["call"].failed: elif ("call" not in report) or report["call"].failed:
print("executing test failed or skipped", request.node.nodeid) print("executing test failed or skipped", request.node.nodeid)
elif ("teardown" not in report) or report["teardown"].failed:
print("tear down test failed or skipped", request.node.nodeid)
if you then have failing tests: if you then have failing tests: