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).
This commit is contained in:
Ran Benita 2020-09-29 13:25:34 +03:00
parent 61f80a783a
commit 3ecdad67b7
1 changed files with 1 additions and 1 deletions

View File

@ -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]