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

Method test_int

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

Source from the content-addressed store, hash-verified

503 assert op(a, approx(x, nan_ok=True))
504
505 def test_int(self):
506 within_1e6 = [(1000001, 1000000), (-1000001, -1000000)]
507 for a, x in within_1e6:
508 assert a == approx(x, rel=5e-6, abs=0)
509 assert a != approx(x, rel=5e-7, abs=0)
510 assert approx(x, rel=5e-6, abs=0) == a
511 assert approx(x, rel=5e-7, abs=0) != a
512
513 def test_decimal(self):
514 within_1e6 = [

Callers

nothing calls this directly

Calls 1

approxFunction · 0.90

Tested by

no test coverage detected