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
| 72 | class="cm"># pytest.raises helper |
| 73 | @overload |
| 74 | def 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 |