mirror of
https://github.com/python/cpython.git
synced 2026-05-31 16:49:25 -04:00
asyncio.test_pep492: Add a test for asyncio.iscoroutinefunction
This commit is contained in:
@@ -107,6 +107,10 @@ class CoroutineTests(BaseTest):
|
||||
|
||||
self.assertTrue(asyncio.iscoroutine(FakeCoro()))
|
||||
|
||||
def test_iscoroutinefunction(self):
|
||||
async def foo(): pass
|
||||
self.assertTrue(asyncio.iscoroutinefunction(foo))
|
||||
|
||||
def test_function_returning_awaitable(self):
|
||||
class Awaitable:
|
||||
def __await__(self):
|
||||
|
||||
Reference in New Issue
Block a user