Should pytest.raises handle PEP-654 ExceptionGroups? #11437
-
If I have a function which raises Typical scenario without groups will pass: with pytest.raises(ValueError):
raise ValueError() But with groups it will fail with uncatched ExceptionGroup: with pytest.raises(ValueError):
raise ExceptionGroup('problem', [ValueError()])
Maybe pytest should support exception groups in |
Beta Was this translation helpful? Give feedback.
Answered by
nicoddemus
Sep 13, 2023
Replies: 2 comments
-
There's an ongoing discussion in #10441. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
graingert
-
Personally I'm opposed to lerting raises handle exception groups due to the difference in cardinality |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There's an ongoing discussion in #10441.