From 1b2de81404172d8b48d93e192b59e4c397e08e8d Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Fri, 21 Aug 2020 13:50:13 +0300 Subject: [PATCH] main: remove unneeded condition in matchnodes The end result in the `else` branch is the same, but flows naturally. --- src/_pytest/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_pytest/main.py b/src/_pytest/main.py index d214f0c29..71c230077 100644 --- a/src/_pytest/main.py +++ b/src/_pytest/main.py @@ -748,7 +748,7 @@ class Session(nodes.FSCollector): self.trace("matchnodes", matching, names) self.trace.root.indent += 1 - if not matching or not names: + if not names: result = matching else: name = names[0]