Skip to content

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

@juliangilbey

Description

@juliangilbey

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions