From 921210acd15a8ca2ca60fd2b4a7f9742ddbb7d6c Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Sun, 2 May 2021 14:13:23 -0400 Subject: [PATCH] Cancel scope on stream consumer completion --- tests/test_streaming.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_streaming.py b/tests/test_streaming.py index 8d8169eac..43acb9562 100644 --- a/tests/test_streaming.py +++ b/tests/test_streaming.py @@ -338,6 +338,8 @@ async def consume(task_status=trio.TASK_STATUS_IGNORED): print("all values streamed, BREAKING") break + cs.cancel() + # TODO: this is justification for a # ``ActorNursery.stream_from_actor()`` helper? await portal.cancel_actor()