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]