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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pytest.approx considers boolean numeric types
3 participants