MCPcopy Create free account
hub / github.com/pytest-dev/pytest / test_absolute_tolerance

Method test_absolute_tolerance

testing/python/approx.py:458–462  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

456 assert a != approx(x, rel=5e-9, abs=0.0)
457
458 def test_absolute_tolerance(self):
459 within_1e8_abs = [(1e8 + 9e-9, 1e8), (1e0 + 9e-9, 1e0), (1e-8 + 9e-9, 1e-8)]
460 for a, x in within_1e8_abs:
461 assert a == approx(x, rel=0, abs=5e-8)
462 assert a != approx(x, rel=0, abs=5e-9)
463
464 def test_expecting_zero(self):
465 examples = [

Callers

nothing calls this directly

Calls 1

approxFunction · 0.90

Tested by

no test coverage detected