Skip to content

Output verbosity for test cases #11639

@plannigan

Description

@plannigan

This is a follow on to fine-grained output verbosity for assertions (#11387/#11473). The next "category" that seems to stand out based on the current behavior is how pytest displays test cases are it executes them. By this I mean the distinction between:

--quiet

................................................................................. [  2%]
................................................................................. [  4%]
<truncated>

vs

default

testing/acceptance_test.py .....                                                  [  0%]
testing/deprecated_test.py ..........                                             [  0%]
testing/test_argcomplete.py ..                                                    [  0%]
<truncated>

vs

--verbose

testing/acceptance_test.py::TestGeneralUsage::test_docstring_on_hookspec PASSED [  0%]
testing/acceptance_test.py::TestInvocationVariants::test_invoke_with_invalid_type PASSED [  0%]
testing/acceptance_test.py::TestInvocationVariants::test_invoke_plugin_api PASSED [  0%]
testing/acceptance_test.py::TestInvocationVariants::test_core_backward_compatibility PASSED [  0%]
<truncated>

Additionally, I think this would also extend to the output of --collect-only (doesn't show all of the states):

--quiet --quiet

testing/_py/test_local.py: 183
testing/acceptance_test.py: 84
testing/code/test_code.py: 17
<truncated>

vs

default

testing/acceptance_test.py::TestGeneralUsage::test_docstring_on_hookspec
testing/acceptance_test.py::TestInvocationVariants::test_invoke_with_invalid_type
testing/acceptance_test.py::TestInvocationVariants::test_invoke_plugin_api
testing/acceptance_test.py::TestInvocationVariants::test_core_backward_compatibility
<truncated>

There doesn't seem to be an existing name for this, so I plan to start the work using test_case. If someone comes up with a better name, I'd be happy to use that. I don't think there would be anything else that would fit into this "category". But feel free to bring things to my attention if I missed something.

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: configrelated to config handling, argument parsing and config filetopic: reportingrelated to terminal output and user-facing messages and errorstype: proposalproposal for a new feature, often to gather opinions or design the API around the new feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions