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

Method test_negative_tolerance_message

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

Source from the content-addressed store, hash-verified

378 1.1 == approx(1, rel, abs)
379
380 def test_negative_tolerance_message(self):
381 # Error message for negative tolerance should include the value.
382 with pytest.raises(ValueError, match="-3"):
383 0 == approx(1, abs=-3)
384 with pytest.raises(ValueError, match="-3"):
385 0 == approx(1, rel=-3)
386
387 def test_inf_tolerance(self):
388 # 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