From f51cd65c949960efa61a9cd36d8b2c6de2987572 Mon Sep 17 00:00:00 2001 From: Lukas Geiger Date: Sun, 21 Jun 2020 00:50:19 +0200 Subject: [PATCH] Simplify failure defuplication in looponfail --- src/xdist/looponfail.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/xdist/looponfail.py b/src/xdist/looponfail.py index ef4c34ff..91c21de2 100644 --- a/src/xdist/looponfail.py +++ b/src/xdist/looponfail.py @@ -121,11 +121,7 @@ def loop_once(self): if collection_failed: pass # "Collection failed, keeping previous failure set" else: - uniq_failures = [] - for failure in failures: - if failure not in uniq_failures: - uniq_failures.append(failure) - self.failures = uniq_failures + self.failures = list(set(failures)) def repr_pytest_looponfailinfo(failreports, rootdirs):