adapt plugin printing

* print each distribution only once(xdist now has 3 entrypoints)
* include the distribution version
This commit is contained in:
Ronny Pfannschmidt 2015-08-08 09:27:16 +02:00
parent 37ed391cc2
commit 2c42f15e00
1 changed files with 7 additions and 2 deletions

View File

@ -300,10 +300,15 @@ class TerminalReporter:
if plugininfo:
l = []
for plugin, dist in plugininfo:
name = dist.project_name
# gets us name and version!
name = str(dist)
# questionable convenience, but it keeps things short
if name.startswith("pytest-"):
name = name[7:]
l.append(name)
# we decided to print python package names
# they can have more than one plugin
if name not in l:
l.append(name)
lines.append("plugins: %s" % ", ".join(l))
return lines