doc: update information about assertion messages (#11285)

It was pointed out[0] that the previous behaviour has been obsoleted by
commit 37bd1e03cb.

[0] https://github.com/pytest-dev/pytest/issues/11265#issuecomment-1666581197

Signed-off-by: Christoph Anton Mitterer <mail@christoph.anton.mitterer.name>
This commit is contained in:
Christoph Anton Mitterer 2023-08-05 21:30:41 +02:00 committed by GitHub
parent b8b74331b4
commit cc0adf6bf3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -54,14 +54,13 @@ operators. (See :ref:`tbreportdemo`). This allows you to use the
idiomatic python constructs without boilerplate code while not losing idiomatic python constructs without boilerplate code while not losing
introspection information. introspection information.
However, if you specify a message with the assertion like this: If a message is specified with the assertion like this:
.. code-block:: python .. code-block:: python
assert a % 2 == 0, "value was odd, should be even" assert a % 2 == 0, "value was odd, should be even"
then no assertion introspection takes places at all and the message it is printed alongside the assertion introspection in the traceback.
will be simply shown in the traceback.
See :ref:`assert-details` for more information on assertion introspection. See :ref:`assert-details` for more information on assertion introspection.