MCPcopy
hub / github.com/pytest-dev/pytest / test_negative_tolerance_message

Method test_negative_tolerance_message

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

Source from the content-addressed store, hash-verified

473 1.1 == approx(1, rel, abs)
474
475 def test_negative_tolerance_message(self):
476 # Error message for negative tolerance should include the value.
477 with pytest.raises(ValueError, match="-3"):
478 0 == approx(1, abs=-3)
479 with pytest.raises(ValueError, match="-3"):
480 0 == approx(1, rel=-3)
481
482 def test_inf_tolerance(self):
483 # Everything should be equal if the tolerance is infinite.

Callers

nothing calls this directly

Calls 1

approxFunction · 0.90

Tested by

no test coverage detected