()
| 120 | |
| 121 | @pytest.mark.anyio |
| 122 | async def test_collapsing_task_group_two_exc() -> None: |
| 123 | class MyException(Exception): |
| 124 | pass |
| 125 | |
| 126 | async def raise_exc() -> None: |
| 127 | raise MyException |
| 128 | |
| 129 | with pytest.raises(ExceptionGroup) as exc: |
| 130 | async with create_collapsing_task_group() as task_group: |
| 131 | task_group.start_soon(raise_exc) |
| 132 | raise MyException |
| 133 | |
| 134 | exc1, exc2 = exc.value.exceptions |
| 135 | assert isinstance(exc1, MyException) |
| 136 | assert isinstance(exc2, MyException) |
nothing calls this directly
no test coverage detected