Add documentaiton & changelog entry

This commit is contained in:
Patrick Lannigan 2023-11-25 15:22:57 -05:00
parent 6e3638a3f0
commit 1181384493
No known key found for this signature in database
GPG Key ID: BBF5D9DED1E4AAF9
3 changed files with 21 additions and 1 deletions

View File

@ -0,0 +1,5 @@
Added the new :confval:`verbosity_test_case` configuration option for fine-grained control of failed assertions verbosity.
See :ref:`Fine-grained verbosity <pytest.fine_grained_verbosity>` for more details.
For plugin authors, :attr:`config.get_verbosity <pytest.Config.get_verbosity>` can be used to retrieve the verbosity level for a specific verbosity type.

View File

@ -298,7 +298,9 @@ This is done by setting a verbosity level in the configuration file for the spec
``pytest --no-header`` with a value of ``2`` would have the same output as the previous example, but each test inside ``pytest --no-header`` with a value of ``2`` would have the same output as the previous example, but each test inside
the file is shown by a single character in the output. the file is shown by a single character in the output.
(Note: currently this is the only option available, but more might be added in the future). :confval:`verbosity_test_case`: Controls how verbose the test execution output should be when pytest is executed.
Running ``pytest --no-header`` with a value of ``2`` would have the same output as the first verbosity example, but each
test inside the file gets its own line in the output.
.. _`pytest.detailed_failed_tests_usage`: .. _`pytest.detailed_failed_tests_usage`:

View File

@ -1835,6 +1835,19 @@ passed multiple times. The expected format is ``name=value``. For example::
"auto" can be used to explicitly use the global verbosity level. "auto" can be used to explicitly use the global verbosity level.
.. confval:: verbosity_test_case
Set a verbosity level specifically for test case execution related output, overriding the application wide level.
.. code-block:: ini
[pytest]
verbosity_test_case = 2
Defaults to application wide verbosity level (via the ``-v`` command-line option). A special value of
"auto" can be used to explicitly use the global verbosity level.
.. confval:: xfail_strict .. confval:: xfail_strict
If set to ``True``, tests marked with ``@pytest.mark.xfail`` that actually succeed will by default fail the If set to ``True``, tests marked with ``@pytest.mark.xfail`` that actually succeed will by default fail the