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

Method test_expecting_zero

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

Source from the content-addressed store, hash-verified

462 assert a != approx(x, rel=0, abs=5e-9)
463
464 def test_expecting_zero(self):
465 examples = [
466 (ne, 1e-6, 0.0),
467 (ne, -1e-6, 0.0),
468 (eq, 1e-12, 0.0),
469 (eq, -1e-12, 0.0),
470 (ne, 2e-12, 0.0),
471 (ne, -2e-12, 0.0),
472 (ne, inf, 0.0),
473 (ne, nan, 0.0),
474 ]
475 for op, a, x in examples:
476 assert op(a, approx(x, rel=0.0, abs=1e-12))
477 assert op(a, approx(x, rel=1e-6, abs=1e-12))
478
479 def test_expecting_inf(self):
480 examples = [

Callers

nothing calls this directly

Calls 1

approxFunction · 0.90

Tested by

no test coverage detected