question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pytest --version less verbose by default

See original GitHub issue

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 https://github.com/pytest-dev/pytest/issues/3692#issuecomment-620670986)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
nicoddemuscommented, Apr 29, 2020

How about using verbosity as indicator

That was my initial suggestion, but others pointed out that --version --version is used by black, pre-commit and even Python itself, so we decided to follow suit.

0reactions
debugduckcommented, May 1, 2020

Thank you so much! I’ll work on it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can i make the output less verbose - pytest - Stack Overflow
Running pytest -vv should make your output more verbose. If you want your output to be less verbose, try pytest -q or pytest...
Read more >
Managing pytest's output — pytest documentation
By default no output will be shown (because KeyboardInterrupt is caught by pytest). By using this option you make sure a trace is...
Read more >
Usage and Invocations — pytest documentation
pytest --version # shows where pytest was imported from pytest --fixtures ... By default no output will be shown (because KeyboardInterrupt is caught...
Read more >
How to manage logging — pytest documentation
By default each captured log message shows the module, line number, log level and message.
Read more >
Deprecations and Removals — pytest documentation
Deprecated since version 6.0. Removed in version 7.0. The pytest.collect module is no longer part of the public API ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found