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

One test fails on i386 architectures: assertEqual rather than assertAlmostEqual #272

Open
juliangilbey opened this issue Dec 14, 2021 · 0 comments

Comments

@juliangilbey
Copy link
Contributor

I just ran the package tests on an i386 architecture, and one of them failed because the last few digits of a float were unequal, presumably because it's 32 bit rather than 64 bit. I think that one should always use assertAlmostEqual rather than assertEqual on numerical tests where a float (other than 0.0 or 1.0) is expected. This will be a moderate job to fix, though; there are over 13000 occurrences of assertEqual in the test suite, many (most?) of which are unaffected. (If they were all on the same line as the values being compared, a Perl one-liner could do the job, but lots are split over two lines, making it a bit more difficult.)

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