trio
trio copied to clipboard
replace `trio.testing.RaisesGroup` with `pytest.RaisesGroup`
pytest 8.4 released RaisesGroup, and it's already better than trio.testing.RaisesGroup with more informative error messages.
I think we can get away with simply aliasing trio.testing.RaisesGroup to pytest.RaisesGroup and trio.testing.Matcher to pytest.RaisesExc, maybe with a short period where we raise a DeprecationWarning if somebody accesses them without pytest available.
We could also start raising warnings straight away for accessing them, given that there's not much reason for keeping them around.
IMO it's easiest to mark them as deprecated attributes and not have to worry about interface differences with pytest/aliasing/etc.