Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions _pytest/terminal.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice if this was joined by a dash rather than space, for consistency with the builtin plugins on line 281.

getpluginversioninfo suggests you can do dist.project_name, dist.version

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good idea, thanks

# 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

Expand Down