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

Don't use exact equality for floating point comparisons in tests #1

Open
offlinemark opened this issue Nov 1, 2020 · 0 comments
Open

Comments

@offlinemark
Copy link
Owner

Currently, test data is generated by running the program and copy/pasting output into the test file, including high precision floating point literals. This is begging to fail on someone else's machine. pytest has support for approximate floating point comparisons which we should use.

https://randycoulman.com/blog/2018/06/19/comparing-floats-in-tests/

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

No branches or pull requests

1 participant