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

Method test_raises_callable_no_exception

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

Source from the content-addressed store, hash-verified

20 assert "invalid literal" in str(excinfo.value)
21
22 def test_raises_callable_no_exception(self) -> None:
23 class A:
24 def __call__(self):
25 pass
26
27 try:
28 pytest.raises(ValueError, A())
29 except pytest.fail.Exception:
30 pass
31
32 def test_raises_falsey_type_error(self) -> None:
33 with pytest.raises(TypeError):

Callers

nothing calls this directly

Calls 1

AClass · 0.70

Tested by

no test coverage detected