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

Method test_raises_function

testing/python/raises.py:18–20  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

16 assert "invalid literal" in str(excinfo.value)
17
18 def test_raises_function(self):
19 excinfo = pytest.raises(ValueError, int, "hello")
20 assert "invalid literal" in str(excinfo.value)
21
22 def test_raises_callable_no_exception(self) -> None:
23 class A:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected