If a test raises an ExceptionGroup
(or nested ExceptionGroup
s) with only a single 'leaf' exception from pytest.xfail()
or pytest.skip()
, we now unwrap it to have the desired effect on Pytest. ExceptionGroup
s with two or more leaf exceptions, even of the same type, are not changed and will be treated as ordinary test failures.
See pytest-dev/pytest#9680 for design discussion. This feature is particularly useful if you've enabled the new strict_exception_groups=True option.