Skip to content

Add option to force "short summary" despite high verbosity #6292

@Delgan

Description

@Delgan

Hi!

By "short summary", I mean the following format with dots:

========================= test session starts ==========================
platform linux -- Python 3.7.4, pytest-4.6.2, py-1.8.0, pluggy-0.12.0
rootdir: /home/delgan/Programmation/loguru, inifile: tox.ini
plugins: xdist-1.29.0, forked-1.0.2, cov-2.7.1
collected 1154 items                                                   

tests/test_activation.py ..............................          [  2%]
tests/test_add_option_backtrace.py .                             [  2%]
tests/test_add_option_catch.py ...........                       [  3%]
tests/test_add_option_colorize.py .............................. [  6%]
tests/test_add_option_diagnose.py .                              [  7%]
tests/test_add_option_enqueue.py .........                       [  7%]
tests/test_add_option_filter.py ................................ [ 10%]
tests/test_add_option_format.py ..................               [ 14%]
tests/test_add_option_kwargs.py .......                          [ 14%]
tests/test_add_option_level.py ..........                        [ 15%]
tests/test_add_option_serialize.py ...                           [ 15%]
tests/test_add_sinks.py ...........................FFF.......... [ 19%]
tests/test_ansimarkup_basic.py ................................. [ 23%]
[...]

Versus the verbose one:

============================= test session starts ==============================

platform linux -- Python 3.5.6, pytest-5.0.1, py-1.8.0, pluggy-0.12.0
cachedir: .tox/py35/.pytest_cache
rootdir: /home/travis/build/Delgan/loguru, inifile: tox.ini
plugins: cov-2.7.1
collected 945 items                
                                            
tests/test_activation.py::test_disable[-False] PASSED                      [  0%]
tests/test_activation.py::test_disable[tests-False] PASSED                 [  0%]
tests/test_activation.py::test_disable[test-True] PASSED                   [  0%]
tests/test_activation.py::test_disable[testss-True] PASSED                 [  0%]
tests/test_activation.py::test_disable[tests.-True] PASSED                 [  0%]
tests/test_activation.py::test_disable[tests.test_activation-False] PASSED [  0%]
tests/test_activation.py::test_disable[tests.test_activation.-True] PASSED [  0%]
tests/test_activation.py::test_disable[test_activation-True] PASSED        [  0%]
tests/test_activation.py::test_disable[.-True] PASSED                      [  0%]
tests/test_activation.py::test_enable[-True] PASSED                        [  1%]
[...]

I personally find the short format more convenient: it allows me to run the tests, change screen to do something else, and come back a few dozen seconds later to see if the tests are going well (assuming that the entire session takes a minute or two to run). This allows me to see at a glance if any tests have failed, and if so, in which group there is a problem. In verbose mode, this is not the case, since the tests scroll too fast on the screen, and there is no global view. Yet, the -vv option is essential to see other useful information and avoid output to be truncated in case of failure.

Hence my question: do you think it would make sense to add an option to force the display using dots regardless of the level of verbosity?

I can definitively implement this and open a PR if you find it interesting.

Metadata

Metadata

Labels

topic: reportingrelated to terminal output and user-facing messages and errorstopic: rewriterelated to the assertion rewrite mechanismtype: 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