Apply documentation suggestions

Co-authored-by: Ran Benita <ran@unusedvar.com>
Co-authored-by: Bruno Oliveira <bruno@soliv.dev>
This commit is contained in:
Patrick Lannigan 2023-10-31 14:03:55 -04:00 committed by GitHub
parent cb9729b009
commit ec76cf55f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 4 deletions

View File

@ -270,16 +270,17 @@ situations, for example you are shown even fixtures that start with ``_`` if you
Using higher verbosity levels (``-vvv``, ``-vvvv``, ...) is supported, but has no effect in pytest itself at the moment, Using higher verbosity levels (``-vvv``, ``-vvvv``, ...) is supported, but has no effect in pytest itself at the moment,
however some plugins might make use of higher verbosity. however some plugins might make use of higher verbosity.
Fine gain verbosity Fine-grained verbosity
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
In addition to specifying the application wide verbosity level, it is possible to control specific aspects independently. In addition to specifying the application wide verbosity level, it is possible to control specific aspects independently.
This is done by setting a verbosity level in the configuration file for the specific aspect of the output. This is done by setting a verbosity level in the configuration file for the specific aspect of the output.
``verbosity_assertions``: Controls how verbose the assertion output should be when pytest is executed. A value of ``2`` :confval:`verbosity_assertions`: Controls how verbose the assertion output should be when pytest is executed. 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 would have the same output as the previous example, but each test inside the file is shown by a single character in the
output. output.
(Note: currently this is the only option available, but more might be added in the future).
.. _`pytest.detailed_failed_tests_usage`: .. _`pytest.detailed_failed_tests_usage`:
Producing a detailed summary report Producing a detailed summary report

View File

@ -48,7 +48,7 @@ def pytest_addoption(parser: Parser) -> None:
"assertions", "assertions",
help=( help=(
"Specify a verbosity level for assertions, overriding the main level. " "Specify a verbosity level for assertions, overriding the main level. "
"Higher levels will provide more a more detailed explanation when an assertion fails." "Higher levels will provide more detailed explanation when an assertion fails."
), ),
) )

View File

@ -1,7 +1,7 @@
"""Utilities for truncating assertion output. """Utilities for truncating assertion output.
Current default behaviour is to truncate assertion explanations at Current default behaviour is to truncate assertion explanations at
terminal lines, unless running with a verbosity level of at least 2 or running on CI. terminal lines, unless running with an assertions verbosity level of at least 2 or running on CI.
""" """
from typing import List from typing import List
from typing import Optional from typing import Optional