Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6d0c4c3

Browse files
committed
asyncio.test_pep492: Add a test for asyncio.iscoroutinefunction
1 parent 315b748 commit 6d0c4c3

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Lib/test/test_asyncio/test_pep492.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@ def __await__(self): yield
107107

108108
self.assertTrue(asyncio.iscoroutine(FakeCoro()))
109109

110+
def test_iscoroutinefunction(self):
111+
async def foo(): pass
112+
self.assertTrue(asyncio.iscoroutinefunction(foo))
113+
110114
def test_function_returning_awaitable(self):
111115
class Awaitable:
112116
def __await__(self):

0 commit comments

Comments
 (0)