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

Method test_negative_tolerance

testing/python/approx.py:470–473  ·  view source on GitHub ↗
(self, rel: float | None, abs: float | None)

Source from the content-addressed store, hash-verified

468 ],
469 )
470 def test_negative_tolerance(self, rel: float | None, abs: float | None) -> None:
471 # Negative tolerances are not allowed.
472 with pytest.raises(ValueError):
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.

Callers

nothing calls this directly

Calls 1

approxFunction · 0.90

Tested by

no test coverage detected