Skip to content

8.3.4: approx broken when mixing numpy booleans and booleans #13047

Closed
@t-b

Description

@t-b

After updating to pytest 8.3.4 the following code

Python 3.11.10 (main, Nov 20 2024, 15:38:42) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pytest
>>> import numpy as np
>>> np.False_ == pytest.approx(False)

returns False where as it returns True with pytest 8.3.3. I would not expect to have to update my code when updating to a patch version.

I would think, without having any clue, that #9354, is the culprit.

$pip list
Package    Version
---------- -------
iniconfig  2.0.0
numpy      2.2.0
packaging  24.2
pip        24.0
pluggy     1.5.0
pytest     8.3.4
setuptools 65.5.0

OS: debian bookworm

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugproblem that needs to be addressedtype: regressionindicates a problem that was introduced in a release which was working previously

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions