-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8.3.4: approx broken when mixing numpy booleans and booleans #13047
Comments
Indeed |
Indeed, unfortunately even though we try our best, sometimes a bug fix might unexpectedly break a valid/existing case. This is strange however, seems like the post example should work given that we have explicit tests for def test_expecting_bool(self) -> None:
assert True == approx(True) # noqa: E712
assert False == approx(False) # noqa: E712
assert True != approx(False) # noqa: E712
assert True != approx(False, abs=2) # noqa: E712
assert 1 != approx(True) I guess throwing |
Thanks both. Sorry for my wording. The rabbit hole got a bit too deep when debugging the problem and finding a pytest bug. |
Fix #13047 --------- Co-authored-by: Bruno Oliveira <[email protected]>
Fix #13047 --------- Co-authored-by: Bruno Oliveira <[email protected]> (cherry picked from commit 0c45497)
Fix #13047 --------- Co-authored-by: Bruno Oliveira <[email protected]> (cherry picked from commit 0c45497) Co-authored-by: Bahram Farahmand <[email protected]>
After updating to pytest 8.3.4 the following code
returns
False
where as it returnsTrue
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.
OS: debian bookworm
The text was updated successfully, but these errors were encountered: