From 04d67ba6fdd600296cf683db81c88e7904fe642f Mon Sep 17 00:00:00 2001 From: zhengguangzhuo <100548634+zhengguangzhuo@users.noreply.github.com> Date: Thu, 22 Oct 2026 20:55:18 +0800 Subject: [PATCH] Skip asyncio coroutine test when API is removed --- src/test_typing_extensions.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/test_typing_extensions.py b/src/test_typing_extensions.py index 48107c04..3d0fc2df 100644 --- a/src/test_typing_extensions.py +++ b/src/test_typing_extensions.py @@ -992,6 +992,11 @@ async def coro(self): pass class DeprecatedCoroTests(BaseTestCase): + @skipUnless( + hasattr(asyncio, "coroutines") + and hasattr(asyncio.coroutines, "iscoroutinefunction"), + "asyncio.coroutines.iscoroutinefunction is unavailable", + ) def test_asyncio_iscoroutinefunction(self): with warnings.catch_warnings(): warnings.simplefilter("ignore", DeprecationWarning)