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

fix: avoid div with zero in assert_approx_eq (backport #2101) #2113

Merged
merged 1 commit into from
Apr 15, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Apr 15, 2024

Currently, when both values are zero assert_approx_eq fails due to division by zero rather than succeeding because the values are the same. This fixes that.


This is an automatic backport of pull request #2101 done by Mergify.

* fix: avoid div with zero in assert_approx_eq

* test: Add tests for assert_approx_eq with zero

* refactor: Make equal check in assert_approx_eq more explicit

(cherry picked from commit 23b1130)
@webmaster128 webmaster128 merged commit 9f88e7c into release/1.5 Apr 15, 2024
29 checks passed
@webmaster128 webmaster128 deleted the mergify/bp/release/1.5/pr-2101 branch April 15, 2024 09:19
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.

2 participants