Flip rpc tests over to use `ExceptionGroup` on new `trio`
parent
9a18b57d38
commit
a5bdc6db66
|
@ -329,7 +329,7 @@ async def inf_streamer(
|
||||||
|
|
||||||
# close out the stream gracefully
|
# close out the stream gracefully
|
||||||
except trio.ClosedResourceError:
|
except trio.ClosedResourceError:
|
||||||
print('msgstream closed on streamer side!')
|
print('transport closed on streamer side!')
|
||||||
assert stream.closed
|
assert stream.closed
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -10,7 +10,6 @@ from contextlib import asynccontextmanager as acm
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
import trio
|
import trio
|
||||||
from trio_typing import TaskStatus
|
|
||||||
import tractor
|
import tractor
|
||||||
from tractor import RemoteActorError
|
from tractor import RemoteActorError
|
||||||
from async_generator import aclosing
|
from async_generator import aclosing
|
||||||
|
|
|
@ -134,7 +134,7 @@ def test_rpc_errors(
|
||||||
value = err.value
|
value = err.value
|
||||||
|
|
||||||
# might get multiple `trio.Cancelled`s as well inside an inception
|
# might get multiple `trio.Cancelled`s as well inside an inception
|
||||||
if isinstance(value, trio.MultiError):
|
if isinstance(value, ExceptionGroup):
|
||||||
value = next(itertools.dropwhile(
|
value = next(itertools.dropwhile(
|
||||||
lambda exc: not isinstance(exc, tractor.RemoteActorError),
|
lambda exc: not isinstance(exc, tractor.RemoteActorError),
|
||||||
value.exceptions
|
value.exceptions
|
||||||
|
|
Loading…
Reference in New Issue