Skip to content

pytest --version less verbose by default #7128

@nicoddemus

Description

@nicoddemus

Currently pytest --version shows something like:

$ pytest --version 
This is pytest version 5.4.2, imported from d:\projects\pytest\src\pytest\__init__.py
setuptools registered plugins:
  hypothesis-4.36.0 at d:\projects\pytest\.env36\lib\site-packages\hypothesis\extra\pytestplugin.py
  pytest-forked-1.1.1 at d:\projects\pytest\.env36\lib\site-packages\pytest_forked\__init__.py
  pytest-xdist-1.31.0 at d:\projects\pytest\.env36\lib\site-packages\xdist\plugin.py
  pytest-xdist-1.31.0 at d:\projects\pytest\.env36\lib\site-packages\xdist\looponfail.py

We should follow other tools (black, pre-commit, Python), where --version shows only the tool version, while --version --version shows more information.

$ pytest --version
pytest 5.4.2

$ pytest --version --version
This is pytest version 5.4.2, imported from d:\projects\pytest\src\pytest\__init__.py
setuptools registered plugins:
  hypothesis-4.36.0 at d:\projects\pytest\.env36\lib\site-packages\hypothesis\extra\pytestplugin.py
  pytest-forked-1.1.1 at d:\projects\pytest\.env36\lib\site-packages\pytest_forked\__init__.py
  pytest-xdist-1.31.0 at d:\projects\pytest\.env36\lib\site-packages\xdist\plugin.py
  pytest-xdist-1.31.0 at d:\projects\pytest\.env36\lib\site-packages\xdist\looponfail.py

(From #3692 (comment))

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueeasy issue that is friendly to new contributortype: enhancementnew feature or API change, should be merged into features branch

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions