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

Method test_bool

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

Source from the content-addressed store, hash-verified

320 assert repr(approx(np_array)) == expected_repr_string
321
322 def test_bool(self):
323 with pytest.raises(AssertionError) as err:
324 assert approx(1)
325
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)

Callers

nothing calls this directly

Calls 2

approxFunction · 0.90
matchMethod · 0.80

Tested by

no test coverage detected