From 3ecdad67b769c963fe08a7da41650d4a6262935c Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Tue, 29 Sep 2020 13:25:34 +0300 Subject: [PATCH] terminal: improve condition on whether to display testpaths in header Make it match better the condition on whether testpaths is used (found in config/__init__.py). --- src/_pytest/terminal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_pytest/terminal.py b/src/_pytest/terminal.py index 34933ad21..2e7ebded6 100644 --- a/src/_pytest/terminal.py +++ b/src/_pytest/terminal.py @@ -719,7 +719,7 @@ class TerminalReporter: line += ", configfile: " + bestrelpath(config.rootpath, config.inipath) testpaths = config.getini("testpaths") # type: List[str] - if testpaths and config.args == testpaths: + if config.invocation_params.dir == config.rootpath and config.args == testpaths: line += ", testpaths: {}".format(", ".join(testpaths)) result = [line]