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

Method test_negative_tolerance

testing/python/approx.py:373–378  ·  view source on GitHub ↗
(
        self, rel: Optional[float], abs: Optional[float]
    )

Source from the content-addressed store, hash-verified

371 ],
372 )
373 def test_negative_tolerance(
374 self, rel: Optional[float], abs: Optional[float]
375 ) -> None:
376 # Negative tolerances are not allowed.
377 with pytest.raises(ValueError):
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.

Callers

nothing calls this directly

Calls 1

approxFunction · 0.90

Tested by

no test coverage detected