You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allows supplying ``ExceptionGroup[Exception]`` and ``BaseExceptionGroup[BaseException]`` to ``pytest.raises`` to keep full typing on ExcInfo.
2
-
Parametrizing with other element types remains an error - we do not check the types of child exceptions and thus do not permit code that might look like we do.
1
+
Allows supplying ``ExceptionGroup[Exception]`` and ``BaseExceptionGroup[BaseException]`` to ``pytest.raises`` to keep full typing on :class:`ExceptionInfo <pytest.ExceptionInfo>`:
2
+
3
+
.. code-block:: python
4
+
5
+
with pytest.raises(ExceptionGroup[Exception]) as exc_info:
6
+
some_function()
7
+
8
+
Parametrizing with other exception types remains an error - we do not check the types of child exceptions and thus do not permit code that might look like we do.
0 commit comments