From 46683965a81ad2ea82030f1e49f5327dd88e79cc 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 5365b430045..54d2660ff0e 100644 --- a/_pytest/terminal.py +++ b/_pytest/terminal.py @@ -300,10 +300,15 @@ def pytest_report_header(self, config): 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