MCPcopy Create free account
hub / github.com/pytest-dev/pytest / _plugin_nameversions

Function _plugin_nameversions

src/_pytest/terminal.py:1353–1364  ·  view source on GitHub ↗
(plugininfo)

Source from the content-addressed store, hash-verified

1351
1352
1353def _plugin_nameversions(plugininfo) -> List[str]:
1354 values: List[str] = []
1355 for plugin, dist in plugininfo:
1356 # Gets us name and version!
1357 name = "{dist.project_name}-{dist.version}".format(dist=dist)
1358 # Questionable convenience, but it keeps things short.
1359 if name.startswith("pytest-"):
1360 name = name[7:]
1361 # We decided to print python package names they can have more than one plugin.
1362 if name not in values:
1363 values.append(name)
1364 return values
1365
1366
1367def format_session_duration(seconds: float) -> str:

Callers 2

test_plugin_nameversionFunction · 0.90
pytest_report_headerMethod · 0.85

Calls 2

appendMethod · 0.80
formatMethod · 0.45

Tested by 1

test_plugin_nameversionFunction · 0.72