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

Method test_nan_tolerance

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

Source from the content-addressed store, hash-verified

402 1 == approx(0, rel=inf, abs=inf)
403
404 def test_nan_tolerance(self) -> None:
405 with pytest.raises(ValueError):
406 1.1 == approx(1, rel=nan)
407 with pytest.raises(ValueError):
408 1.1 == approx(1, abs=nan)
409 with pytest.raises(ValueError):
410 1.1 == approx(1, rel=nan, abs=nan)
411
412 def test_reasonable_defaults(self):
413 # Whatever the defaults are, they should work for numbers close to 1

Callers

nothing calls this directly

Calls 1

approxFunction · 0.90

Tested by

no test coverage detected