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

Function raises

src/_pytest/raises.py:74–79  ·  src/_pytest/raises.py::raises
(
    expected_exception: type[E] | tuple[type[E], ...],
    *,
    match: str | re.Pattern[str] | None = ...,
    check: Callable[[E], bool] = ...,
)

Source from the content-addressed store, hash-verified

72class="cm"># pytest.raises helper
73@overload
74def raises(
75 expected_exception: type[E] | tuple[type[E], ...],
76 *,
77 match: str | re.Pattern[str] | None = ...,
78 check: Callable[[E], bool] = ...,
79) -> RaisesExc[E]: ...
80
81
82@overload

Callers 2

test_raisesMethod · 0.90
test_raises_doesntMethod · 0.90

Calls 3

RaisesExcClass · 0.85
joinMethod · 0.80
funcFunction · 0.50

Tested by 2

test_raisesMethod · 0.72
test_raises_doesntMethod · 0.72