Show testpaths option in the header if it has been used for collection

Fix #4875
This commit is contained in:
Bruno Oliveira
2019-03-02 11:17:43 -03:00
parent e1f97e41e3
commit 53b8aa065c
3 changed files with 29 additions and 1 deletions

View File

@@ -586,8 +586,13 @@ class TerminalReporter(object):
inifile = ""
if config.inifile:
inifile = " " + config.rootdir.bestrelpath(config.inifile)
lines = ["rootdir: %s, inifile:%s" % (config.rootdir, inifile)]
line = "rootdir: %s, inifile:%s" % (config.rootdir, inifile)
testpaths = config.getini("testpaths")
if testpaths and config.args == testpaths:
rel_paths = [config.rootdir.bestrelpath(x) for x in testpaths]
line += ", testpaths: {}".format(", ".join(rel_paths))
lines = [line]
plugininfo = config.pluginmanager.list_plugin_distinfo()
if plugininfo: