-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unwrap magic exceptions from single-leaf groups
- Loading branch information
Showing
3 changed files
with
79 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
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 <https://github.com/pytest-dev/pytest/issues/9680>`__ | ||
for design discussion. This feature is particularly useful if you've enabled | ||
`the new strict_exception_groups=True option | ||
<https://trio.readthedocs.io/en/stable/reference-core.html#strict-versus-loose-exceptiongroup-semantics>`__. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters