From a5bdc6db668e3344d876574968b3818937ec114c Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Tue, 5 Mar 2024 10:34:32 -0500 Subject: [PATCH] Flip rpc tests over to use `ExceptionGroup` on new `trio` --- tests/test_advanced_streaming.py | 2 +- tests/test_child_manages_service_nursery.py | 1 - tests/test_rpc.py | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/test_advanced_streaming.py b/tests/test_advanced_streaming.py index 8061c3b..e869634 100644 --- a/tests/test_advanced_streaming.py +++ b/tests/test_advanced_streaming.py @@ -329,7 +329,7 @@ async def inf_streamer( # close out the stream gracefully except trio.ClosedResourceError: - print('msgstream closed on streamer side!') + print('transport closed on streamer side!') assert stream.closed break else: diff --git a/tests/test_child_manages_service_nursery.py b/tests/test_child_manages_service_nursery.py index fd1ceb8..228d6ad 100644 --- a/tests/test_child_manages_service_nursery.py +++ b/tests/test_child_manages_service_nursery.py @@ -10,7 +10,6 @@ from contextlib import asynccontextmanager as acm import pytest import trio -from trio_typing import TaskStatus import tractor from tractor import RemoteActorError from async_generator import aclosing diff --git a/tests/test_rpc.py b/tests/test_rpc.py index 3404c60..1a46666 100644 --- a/tests/test_rpc.py +++ b/tests/test_rpc.py @@ -134,7 +134,7 @@ def test_rpc_errors( value = err.value # might get multiple `trio.Cancelled`s as well inside an inception - if isinstance(value, trio.MultiError): + if isinstance(value, ExceptionGroup): value = next(itertools.dropwhile( lambda exc: not isinstance(exc, tractor.RemoteActorError), value.exceptions