def pytest_collectreport(self, report):
    passed = (report.outcome in ('passed', 'skipped'))
    if passed:
        if (report.nodeid in self.lastfailed):
            self.lastfailed.pop(report.nodeid)
            self.lastfailed.update(((item.nodeid, True) for item in report.result))
    else:
        self.lastfailed[report.nodeid] = True
def pytest_collectreport(self, report):
    passed = (report.outcome in ('passed', 'skipped'))
    if passed:
        if (report.nodeid in self.lastfailed):
            self.lastfailed.pop(report.nodeid)
            self.lastfailed.update(((item.nodeid, True) for item in report.result))
    else:
        self.lastfailed[report.nodeid] = True