GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Use exact comparison for bool in approx() by jvansanten · Pull Request #9354 · pytest-dev/pytest

Conversation

@jvansanten

@jvansanten jvansanten commented Nov 30, 2021

Copy link
Copy Markdown
Contributor

Fixes #9353.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
jvansanten and others added 3 commits November 30, 2021 11:54
@jvansanten
Use exact comparison for bool in approx()
f119657
Fixes pytest-dev#9353.
@pre-commit-ci
[pre-commit.ci] auto fixes from pre-commit.com hooks
011706e
for more information, see https://pre-commit.ci
@jvansanten
Fix lint flagged by pre-commit
50d839c
@nicoddemus

nicoddemus commented Jun 14, 2022

Copy link
Copy Markdown
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!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

nicoddemus
nicoddemus reviewed Jun 14, 2022
View reviewed changes
Comment thread changelog/9353.bugfix.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@jvansanten @nicoddemus
Reword changelog
9e5243a
Co-authored-by: Bruno Oliveira <[email protected]>
RonnyPfannschmidt
RonnyPfannschmidt reviewed Jun 14, 2022
View reviewed changes

@RonnyPfannschmidt RonnyPfannschmidt left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this 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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@marcelotrevisani

marcelotrevisani commented Nov 29, 2024

Copy link
Copy Markdown
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?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nicoddemus

nicoddemus commented Nov 29, 2024

Copy link
Copy Markdown
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?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nicoddemus
Merge remote-tracking branch 'upstream/main' into jvansanten/issue-9353
64b5894
@pyba-chronographer pyba-chronographer Bot added the bot:chronographer:provided (automation) changelog entry is part of PR label Nov 29, 2024
nicoddemus
nicoddemus approved these changes Nov 29, 2024
View reviewed changes
@nicoddemus

nicoddemus commented Nov 29, 2024

Copy link
Copy Markdown
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!

marcelotrevisani-centrica reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nicoddemus nicoddemus added the backport 8.3.x label Nov 29, 2024
RonnyPfannschmidt
RonnyPfannschmidt approved these changes Nov 29, 2024
View reviewed changes

@RonnyPfannschmidt RonnyPfannschmidt left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this 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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@nicoddemus
nicoddemus merged commit a16e8ea into pytest-dev:main Nov 29, 2024
@patchback

patchback Bot commented Nov 29, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@patchback patchback Bot mentioned this pull request Nov 29, 2024
[PR #9354/a16e8eac backport][8.3.x] Use exact comparison for bool in approx() #13013
Merged
@t-b t-b mentioned this pull request Dec 9, 2024
8.3.4: approx broken when mixing numpy booleans and booleans #13047
Closed
@malangsiddharth malangsiddharth mentioned this pull request Jan 14, 2025
Fix issue #13047: Handle numpy booleans in pytest.approx #13132
Closed
yuyichao added a commit to euriqa-brassboard/brassboard-seq that referenced this pull request Feb 12, 2025
@yuyichao
Workaround pytest breaking change
ff6e6fb
Also fix list comparison that was only comparing the first element...

Ref pytest-dev/pytest#9354
Ref pytest-dev/pytest#13218
@callummscott callummscott mentioned this pull request Apr 2, 2025
approx equal can be more restricted than == #13218
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@RonnyPfannschmidt RonnyPfannschmidt RonnyPfannschmidt approved these changes
@nicoddemus nicoddemus nicoddemus approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

bot:chronographer:provided (automation) changelog entry is part of PR

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

pytest.approx considers boolean numeric types

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@jvansanten @nicoddemus @marcelotrevisani @RonnyPfannschmidt
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.