From fc831dbfd626ffe917fb16d0e175ad7a7aa60fa1 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Wed, 30 Jun 2021 13:52:04 -0400 Subject: [PATCH] Expect context cancelled when we cancel --- tests/test_2way.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_2way.py b/tests/test_2way.py index 716e2ce..1ef05d2 100644 --- a/tests/test_2way.py +++ b/tests/test_2way.py @@ -262,7 +262,7 @@ async def test_caller_closes_ctx_after_callee_opens_stream( async with ctx.open_stream() as stream: async for msg in stream: pass - except trio.ClosedResourceError: + except tractor.ContextCancelled: pass else: assert 0, "Should have received closed resource error?"