We're making use of exception groups in the grid objects to return all issues with the attributes in a single exception group. However, pytest does not support matching exception groups (instead, its documentation states that excinfo.group_contains should be used to assert the structure of the caught exception group).
While possible, this means we can't use parametrize to generate lots of test cases.
Instead, here's two ways to make assertions about the structure of a exception group:
using Match objects that aim to support nested pytest.raises-style checks
using assert_exceptions_equal, which compares two exceptions and raises a (somewhat) informative error
this most certainly could use some improvements and the Match API still feels kinda weird, but for now I think this is good enough to make use of in other PRs.
We're making use of exception groups in the grid objects to return all issues with the attributes in a single exception group. However,
pytest
does not support matching exception groups (instead, its documentation states thatexcinfo.group_contains
should be used to assert the structure of the caught exception group).While possible, this means we can't use
parametrize
to generate lots of test cases.Instead, here's two ways to make assertions about the structure of a exception group:
Match
objects that aim to support nestedpytest.raises
-style checksassert_exceptions_equal
, which compares two exceptions and raises a (somewhat) informative error