From 2c42f15e004226eb7b3fff917affb1cfbb8ca4aa Mon Sep 17 00:00:00 2001 From: Ronny Pfannschmidt Date: Sat, 8 Aug 2015 09:27:16 +0200 Subject: [PATCH] adapt plugin printing * print each distribution only once(xdist now has 3 entrypoints) * include the distribution version --- _pytest/terminal.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/_pytest/terminal.py b/_pytest/terminal.py index 5365b4300..54d2660ff 100644 --- a/_pytest/terminal.py +++ b/_pytest/terminal.py @@ -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