From cc0adf6bf3c9f356e3473ff8a21004b9c1fb2b93 Mon Sep 17 00:00:00 2001 From: Christoph Anton Mitterer Date: Sat, 5 Aug 2023 21:30:41 +0200 Subject: [PATCH] doc: update information about assertion messages (#11285) It was pointed out[0] that the previous behaviour has been obsoleted by commit 37bd1e03cb77a26ae80873a8725c87d57fda987c. [0] https://github.com/pytest-dev/pytest/issues/11265#issuecomment-1666581197 Signed-off-by: Christoph Anton Mitterer --- doc/en/how-to/assert.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/doc/en/how-to/assert.rst b/doc/en/how-to/assert.rst index 1b10c1313..d99a1ce5c 100644 --- a/doc/en/how-to/assert.rst +++ b/doc/en/how-to/assert.rst @@ -54,14 +54,13 @@ operators. (See :ref:`tbreportdemo`). This allows you to use the idiomatic python constructs without boilerplate code while not losing 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 assert a % 2 == 0, "value was odd, should be even" -then no assertion introspection takes places at all and the message -will be simply shown in the traceback. +it is printed alongside the assertion introspection in the traceback. See :ref:`assert-details` for more information on assertion introspection.