MCPcopy
hub / github.com/pytest-dev/pytest / test_bool

Method test_bool

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

Source from the content-addressed store, hash-verified

386 assert repr(approx(np_array)) == expected_repr_string
387
388 def test_bool(self):
389 with pytest.raises(AssertionError) as err:
390 assert approx(1)
391
392 assert err.match(r"approx\(\) is not supported in a boolean context")
393
394 def test_mixed_sequence(self, assert_approx_raises_regex) -> None:
395 """Approx should work on sequences that also contain non-numbers (#13010)."""

Callers

nothing calls this directly

Calls 2

approxFunction · 0.90
matchMethod · 0.80

Tested by

no test coverage detected