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

Method test_check_callable

testing/test_recwarn.py:223–226  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

221
222class TestWarns:
223 def test_check_callable(self) -> None:
224 source = "warnings.warn('w1', RuntimeWarning)"
225 with pytest.raises(TypeError, match=r".* must be callable"):
226 pytest.warns(RuntimeWarning, source) # type: ignore
227
228 def test_several_messages(self) -> None:
229 # different messages, b/c Python suppresses multiple identical warnings

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected