Skip to content

testHypot in test_match uses assertEqual on floats #124040

@mcepl

Description

@mcepl

https://github.com/python/cpython/blob/main/Lib/test/test_math.py#L794-L871

We (SUSE) have test self.assertEqual(hypot(1, -1), math.sqrt(2)) failing on some distros and some architectures (namely i586) and I suspect that whole idea of assertEqual on two floating point numbers is very unfortunate. Shouldn't be there at least assertAlmostEqual?

Cc: @mdickinson, @rhettinger, @danigm

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    testsTests in the Lib/test dir

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions