Skip to content

Commit a202455

Browse files
Khabib73srittau
andauthored
Skip the legacy asyncio coroutine test when its API is unavailable (#819)
Co-authored-by: Sebastian Rittau <sebastian.rittau@zfutura.de>
1 parent 8d823bb commit a202455

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎src/test_typing_extensions.py‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -992,6 +992,11 @@ async def coro(self):
992992
pass
993993

994994
class DeprecatedCoroTests(BaseTestCase):
995+
@skipUnless(
996+
hasattr(asyncio, "coroutines")
997+
and hasattr(asyncio.coroutines, "iscoroutinefunction"),
998+
"asyncio.coroutines.iscoroutinefunction is unavailable",
999+
)
9951000
def test_asyncio_iscoroutinefunction(self):
9961001
with warnings.catch_warnings():
9971002
warnings.simplefilter("ignore", DeprecationWarning)

0 commit comments

Comments
 (0)