[issue27198] Adding an assertClose() method to unittest.TestCase

Chris Barker report at bugs.python.org
Fri Jun 3 15:48:37 EDT 2016


Chris Barker added the comment:

Thanks,

I'll add the equation to the docstring and docs.

As for adding a rel_tol to assertAlmostEqual -- I think that's a bad idea -- it's a pretty different concept -- overloading the same method would be more confusing than anything else.

in isclose(), abs_tol is mostly there to support comparison to zero. delta, on the other hand, is consistent with assertAlmost eual in the sense that you need to know the order of magnitude of your values apriori.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27198>
_______________________________________


More information about the Python-bugs-list mailing list