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

Add pytest approx to float comparisons in tests #97

Merged
merged 1 commit into from
Oct 29, 2024

Conversation

jatkinson1000
Copy link
Owner

Add pytest approx to float comparisons in tests where not currently used and it makes sense to do so.

Closes #93

Pytest approx or allclose is in use in most places, but I have had a check through and added a couple more where it might be appropriate.

There are still some instances where it does not make sense (as @LiamPattinson notes in #93) which have been left.
If any further have been missed we can review them should they raise problems in future, but this can hopefully close #93.

@jatkinson1000 jatkinson1000 self-assigned this Oct 29, 2024
@jatkinson1000
Copy link
Owner Author

@LiamPattinson would you be OK to give this a quick review if you have a moment?
Doing a little spring-cleaning on issues.

Copy link
Contributor

@LiamPattinson LiamPattinson left a comment

Choose a reason for hiding this comment

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

All looks good to me! I did a quick scan of the tests for any that you missed, and I think you got everything.

@jatkinson1000
Copy link
Owner Author

So fast! Thanks @LiamPattinson

@jatkinson1000 jatkinson1000 merged commit e9025fe into main Oct 29, 2024
13 checks passed
@jatkinson1000 jatkinson1000 deleted the test-float-approx branch October 29, 2024 15:06
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.

Exact comparisons with floating points in tests
2 participants