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

Method test_numpy_scalar_with_array

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

Source from the content-addressed store, hash-verified

850 assert approx(expected, rel=5e-8, abs=0) != actual
851
852 def test_numpy_scalar_with_array(self):
853 np = pytest.importorskip("numpy")
854
855 actual = 1.0
856 expected = np.array([1 + 1e-7, 1 - 1e-8])
857
858 assert actual == approx(expected, rel=5e-7, abs=0)
859 assert actual != approx(expected, rel=5e-8, abs=0)
860 assert approx(expected, rel=5e-7, abs=0) == actual
861 assert approx(expected, rel=5e-8, abs=0) != actual
862
863 def test_generic_sized_iterable_object(self):
864 class MySizedIterable:

Callers

nothing calls this directly

Calls 1

approxFunction · 0.90

Tested by

no test coverage detected