Files
pytest2/changelog/10441.feature.rst
Mihail Milushev ab8f5ce7f4 Add new ExceptionInfo.group_contains assertion helper method
Tests if a captured exception group contains an expected exception.
Will raise `AssertionError` if the wrapped exception is not an exception group.
Supports recursive search into nested exception groups.
2023-09-17 22:28:32 +01:00

3 lines
169 B
ReStructuredText

Added :func:`ExceptionInfo.group_contains() <pytest.ExceptionInfo.group_contains>`, an assertion
helper that tests if an `ExceptionGroup` contains a matching exception.