Steven D'Aprano added the comment:
To be clear, let's look at the first failed assertion:
AssertionError: 32.78 != 32.775 within 2 places
It sure *looks* like 32.775 ought to round to 32.78. And indeed it would, if it
actually was 32.775. But despite appearances, it isn't. Sure, the number pri
R. David Murray added the comment:
You must have missed the note about floating point (in the grey box).
assertAlmostEqual is a bit of problem child in any case. There are open issues
about improved functionality for the use case it tries to address.
--
nosy: +r.david.murray
resolutio
New submission from Mike Williamson:
Ran a test that I expected to pass. When the test failed, I was struck by the
strange (incorrect) assertion claim when using unittest.assertAlmostEqual:
AssertionError: 32.78 != 32.775 within 2 places
Uhmm... yes it does!
I delved in, discovering that as