1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
Forwarded: https://github.com/agronholm/anyio/pull/1063
--- a/tests/test_taskgroups.py
+++ b/tests/test_taskgroups.py
@@ -11,7 +11,6 @@
from unittest import mock
import pytest
-from exceptiongroup import catch
from pytest import FixtureRequest, MonkeyPatch
import anyio
@@ -1555,8 +1554,10 @@
with CancelScope() as scope:
scope.cancel()
- with catch({get_cancelled_exc_class(): handler}):
+ try:
await anyio.sleep_forever()
+ except get_cancelled_exc_class() as e:
+ handler(BaseExceptionGroup("", [e]))
async def test_cancel_child_task_when_host_is_shielded() -> None:
|