abydos icon indicating copy to clipboard operation
abydos copied to clipboard

One test fails on i386 architectures: assertEqual rather than assertAlmostEqual

Open juliangilbey opened this issue 4 years ago • 0 comments

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.)

juliangilbey avatar Dec 14 '21 06:12 juliangilbey