From 3a0f436c1a02f41af942e2d9f3d3a64f5fff3db2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20B=C3=BClter?= Date: Fri, 6 Dec 2019 08:40:49 +0100 Subject: [PATCH] Iterate a generator expression instead of a temporary list Co-Authored-By: Bruno Oliveira --- src/_pytest/mark/legacy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_pytest/mark/legacy.py b/src/_pytest/mark/legacy.py index 651288cb8..766b8f9bd 100644 --- a/src/_pytest/mark/legacy.py +++ b/src/_pytest/mark/legacy.py @@ -63,7 +63,7 @@ class KeywordMapping: """ subname = subname.lower() - names = [name.lower() for name in self._names] + names = (name.lower() for name in self._names) for name in names: if subname in name: