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

Method test_operator_overloading

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

Source from the content-addressed store, hash-verified

326 assert err.match(r"approx\(\) is not supported in a boolean context")
327
328 def test_operator_overloading(self):
329 assert 1 == approx(1, rel=1e-6, abs=1e-12)
330 assert not (1 != approx(1, rel=1e-6, abs=1e-12))
331 assert 10 != approx(1, rel=1e-6, abs=1e-12)
332 assert not (10 == approx(1, rel=1e-6, abs=1e-12))
333
334 def test_exactly_equal(self):
335 examples = [

Callers

nothing calls this directly

Calls 1

approxFunction · 0.90

Tested by

no test coverage detected