def yieldtestprotocol(item, log=True, nextitem=None): hasrequest = hasattr(item, "_request") result = True if hasrequest and not item._request: item._initrequest() if not item.was_already_run: rep = call_and_report(item, "setup", log) if not rep.passed: item.was_finished = True if rep.passed and item.config.option.setupshow: show_test_item(item) if item.was_already_run or rep.passed: if not item.config.option.setuponly: result = yield_and_report(item, "call", log) if item.was_finished: call_and_report(item, "teardown", log, nextitem=nextitem) if hasrequest: item._request = False item.funcargs = None return result
def basic_run_report(item): runner.call_and_report(item, "setup", log=False) return runner.call_and_report(item, "call", log=False)