pytest 8.3.4 (2024-12-01)
Bug fixes
-
#12592: Fixed
KeyError
{.interpreted-text role="class"} crash when using--import-mode=importlib
in a directory layout where a directory contains a child directory with the same name. -
#12818: Assertion rewriting now preserves the source ranges of the original instructions, making it play well with tools that deal with the
AST
, like executing. -
#12849: ANSI escape codes for colored output now handled correctly in
pytest.fail
{.interpreted-text role="func"} with [pytrace=False]{.title-ref}. -
#9353:
pytest.approx
{.interpreted-text role="func"} now uses strict equality when given booleans.
Improved documentation
-
#10558: Fix ambiguous docstring of
pytest.Config.getoption
{.interpreted-text role="func"}. -
#10829: Improve documentation on the current handling of the
--basetemp
option and its lack of retention functionality (temporary directory location and retention
{.interpreted-text role="ref"}). -
#12866: Improved cross-references concerning the
recwarn
{.interpreted-text role="fixture"} fixture. -
#12966: Clarify
filterwarnings
{.interpreted-text role="ref"} docs on filter precedence/order when using multiple@pytest.mark.filterwarnings <pytest.mark.filterwarnings ref>
{.interpreted-text role="ref"} marks.
Contributor-facing changes
- #12497: Fixed two failing pdb-related tests on Python 3.13.