Sourced from pytest's releases.
8.4.2
pytest 8.4.2 (2025-09-03)
Bug fixes
#13478: Fixed a crash when using
console_output_style
{.interpreted-text role="confval"} withtimes
and a module is skipped.#13530: Fixed a crash when using
pytest.approx
{.interpreted-text role="func"} anddecimal.Decimal
{.interpreted-text role="class"} instances with thedecimal.FloatOperation
{.interpreted-text role="class"} trap set.#13549: No longer evaluate type annotations in Python
3.14
when inspecting function signatures.This prevents crashes during module collection when modules do not explicitly use
from __future__ import annotations
and import types for annotations within aif TYPE_CHECKING:
block.#13559: Added missing [int]{.title-ref} and [float]{.title-ref} variants to the [Literal]{.title-ref} type annotation of the [type]{.title-ref} parameter in
pytest.Parser.addini
{.interpreted-text role="meth"}.#13563:
pytest.approx
{.interpreted-text role="func"} now only importsnumpy
if NumPy is already insys.modules
. This fixes unconditional import behavior introduced in [8.4.0]{.title-ref}.Improved documentation
- #13577: Clarify that
pytest_generate_tests
is discovered in test modules/classes; other hooks must be inconftest.py
or plugins.Contributor-facing changes
- #13480: Self-testing: fixed a few test failures when run with
-Wdefault
or a similar override.- #13547: Self-testing: corrected expected message for
test_doctest_unexpected_exception
in Python3.14
.- #13684: Make pytest's own testsuite insensitive to the presence of the
CI
environment variable -- byogrisel
{.interpreted-text role="user"}.
bfae422
Prepare release version 8.4.28990538
Fix passenv CI in tox ini and make tests insensitive to the presence of
the C...ca676bf
Merge pull request #13687
from pytest-dev/patchback/backports/8.4.x/e63f6e51c...975a60a
Merge pull request #13686
from pytest-dev/patchback/backports/8.4.x/12bde8af6...7723ce8
Merge pull request #13683
from even-even/fix_Exeption_to_Exception_in_errorMe...b7f0568
Merge pull request #13685
from CoretexShadow/fix/docs-pytest-generate-tests2c94c4a
add missing colon (#13640)
(#13641)c3d7684
Merge pull request #13606
from pytest-dev/patchback/backports/8.4.x/5f9938563...dc6e3be
Merge pull request #13605
from The-Compiler/training-update-2025-07f87289c
Fix crash with times
output style and skipped module (#13573)
(#13579)