def pytest_runtest_logreport(self, report):
    if (((report.when == 'call') and report.passed) or report.skipped):
        self.lastfailed.pop(report.nodeid, None)
    elif report.failed:
        self.lastfailed[report.nodeid] = True
def pytest_runtest_logreport(self, report):
    if (((report.when == 'call') and report.passed) or report.skipped):
        self.lastfailed.pop(report.nodeid, None)
    elif report.failed:
        self.lastfailed[report.nodeid] = True