-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
topic: parametrizerelated to @pytest.mark.parametrizerelated to @pytest.mark.parametrizetype: enhancementnew feature or API change, should be merged into features branchnew feature or API change, should be merged into features branch
Description
Suppose you have a parameterized test, some params of which are expected to raise (e.g.) IndexError
:
return pytest.param(
...,
marks=pytest.mark.xfail(raises=IndexError, strict=True),
)
If your test is async though, you'll actually raise an ExceptionGroup(..., [IndexError])
(maybe with even more nesting), so the tests will still fail. Can we make this more ergonomic? What would a parametrize-aware RaisesGroup
-like thing look like?
Metadata
Metadata
Assignees
Labels
topic: parametrizerelated to @pytest.mark.parametrizerelated to @pytest.mark.parametrizetype: enhancementnew feature or API change, should be merged into features branchnew feature or API change, should be merged into features branch