Skip to content

Commit

Permalink
terminal: improve condition on whether to display testpaths in header
Browse files Browse the repository at this point in the history
Make it match better the condition on whether testpaths is used (found
in config/__init__.py).
  • Loading branch information
bluetech committed Sep 29, 2020
1 parent 61f80a7 commit 3ecdad6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/_pytest/terminal.py
Expand Up @@ -719,7 +719,7 @@ def pytest_report_header(self, config: Config) -> List[str]:
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]
Expand Down

0 comments on commit 3ecdad6

Please sign in to comment.