diff --git a/tests/extract/test_extract_pipe.py b/tests/extract/test_extract_pipe.py index 20b03a0c51..38dc8a9319 100644 --- a/tests/extract/test_extract_pipe.py +++ b/tests/extract/test_extract_pipe.py @@ -718,6 +718,8 @@ async def long_gen(): close_pipe_yielding = False except GeneratorExit: close_pipe_got_exit = True + except asyncio.CancelledError: + close_pipe_got_exit = True # execute in a thread async def raise_gen(item: int):