mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
GH-102748: remove legacy support for generator based coroutines from asyncio.iscoroutine
(#102749)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
parent
fbe82fdd77
commit
adaed17341
4 changed files with 14 additions and 2 deletions
|
@ -119,6 +119,12 @@ class CoroutineTests(BaseTest):
|
|||
|
||||
self.assertTrue(asyncio.iscoroutine(FakeCoro()))
|
||||
|
||||
def test_iscoroutine_generator(self):
|
||||
def foo(): yield
|
||||
|
||||
self.assertFalse(asyncio.iscoroutine(foo()))
|
||||
|
||||
|
||||
def test_iscoroutinefunction(self):
|
||||
async def foo(): pass
|
||||
self.assertTrue(asyncio.iscoroutinefunction(foo))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue