MCPcopy Index your code
hub / github.com/python/cpython / _check_approx_num

Method _check_approx_num

Lib/test/test_statistics.py:272–279  ·  view source on GitHub ↗
(self, first, second, tol, rel, msg, idx=None)

Source from the content-addressed store, hash-verified

270 self._check_approx_num(a, e, tol, rel, msg, i)
271
272 def _check_approx_num(self, first, second, tol, rel, msg, idx=None):
273 if approx_equal(first, second, tol, rel):
274 # Test passes. Return early, we are done.
275 return None
276 # Otherwise we failed.
277 standardMsg = self._make_std_err_msg(first, second, tol, rel, idx)
278 msg = self._formatMessage(msg, standardMsg)
279 raise self.failureException(msg)
280
281 @staticmethod
282 def _make_std_err_msg(first, second, tol, rel, idx):

Callers 1

_check_approx_seqMethod · 0.95

Calls 3

_make_std_err_msgMethod · 0.95
approx_equalFunction · 0.85
_formatMessageMethod · 0.80

Tested by

no test coverage detected