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

Method _check_approx_seq

Lib/test/test_statistics.py:261–270  ·  view source on GitHub ↗
(self, first, second, tol, rel, msg)

Source from the content-addressed store, hash-verified

259 check(first, second, tol, rel, msg)
260
261 def _check_approx_seq(self, first, second, tol, rel, msg):
262 if len(first) != len(second):
263 standardMsg = (
264 "sequences differ in length: %d items != %d items"
265 % (len(first), len(second))
266 )
267 msg = self._formatMessage(msg, standardMsg)
268 raise self.failureException(msg)
269 for i, (a,e) in enumerate(zip(first, second)):
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):

Callers

nothing calls this directly

Calls 3

_check_approx_numMethod · 0.95
enumerateFunction · 0.85
_formatMessageMethod · 0.80

Tested by

no test coverage detected