Skip to content
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

Use exact comparison for bool in approx() #9354

Merged
merged 5 commits into from
Nov 29, 2024

Conversation

jvansanten
Copy link
Contributor

Fixes #9353.

@nicoddemus
Copy link
Member

Hi @jvansanten,

Was taking a look at the list of PRs and this one seems to have gone unnoticed, sorry about that.

Overall all changes look good to me, I left a comment about the changelog only. Would you like to finish it up? If you don't have the time please let us know so we can do it. Thanks, and sorry for the delay again!

Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
Copy link
Member

@RonnyPfannschmidt RonnyPfannschmidt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For approx of bool, doesn't it semantically make sense to check for truthy values when requested explicitly, but also ensure is checks for implicit matches in lists mappings

@marcelotrevisani
Copy link
Contributor

hey, I just got into this problems these days and found this PR. What is it missing to get this over the line please?

@nicoddemus
Copy link
Member

Seems this fell through the cracks, thanks for the ping. I will rebase.

@RonnyPfannschmidt anything else you would like changed here before we merge it?

@psf-chronographer psf-chronographer bot added the bot:chronographer:provided (automation) changelog entry is part of PR label Nov 29, 2024
@nicoddemus
Copy link
Member

Will squash/merge in the next few days. Thanks @jvansanten for the PR and sorry that we missed this one. Also thanks @marcelotrevisani for the ping!

@nicoddemus nicoddemus added the backport 8.3.x apply to PRs at any point; backports the changes to the 8.3.x branch label Nov 29, 2024
Copy link
Member

@RonnyPfannschmidt RonnyPfannschmidt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its good as is atm - the more tricky details are for when we implement matchers

@nicoddemus nicoddemus merged commit a16e8ea into pytest-dev:main Nov 29, 2024
27 of 28 checks passed
Copy link

patchback bot commented Nov 29, 2024

Backport to 8.3.x: 💚 backport PR created

✅ Backport PR branch: patchback/backports/8.3.x/a16e8eac8c91b8d0f91c461a4de39adbf8a75b0f/pr-9354

Backported as #13013

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 8.3.x apply to PRs at any point; backports the changes to the 8.3.x branch bot:chronographer:provided (automation) changelog entry is part of PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pytest.approx considers boolean numeric types
4 participants