From 52a5acda922e8b2dbc8de91397a472d9acc293c9 Mon Sep 17 00:00:00 2001 From: Dmitry Malinovsky Date: Fri, 11 Mar 2016 14:48:17 +0600 Subject: [PATCH] Use testscollected to make xdist happy --- _pytest/cacheprovider.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_pytest/cacheprovider.py b/_pytest/cacheprovider.py index b593f1604..0657001f2 100755 --- a/_pytest/cacheprovider.py +++ b/_pytest/cacheprovider.py @@ -150,7 +150,7 @@ class LFPlugin: if config.getvalue("cacheshow") or hasattr(config, "slaveinput"): return prev_failed = config.cache.get("cache/lastfailed", None) is not None - if (session.items and prev_failed) or self.lastfailed: + if (session.testscollected and prev_failed) or self.lastfailed: config.cache.set("cache/lastfailed", self.lastfailed)