summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYury Selivanov <yselivanov@sprymix.com>2015-08-05 18:47:33 (GMT)
committerYury Selivanov <yselivanov@sprymix.com>2015-08-05 18:47:33 (GMT)
commit6d0c4c38d1ba77d1534df130ca101affe98a46ef (patch)
tree604888105c1d5cfc9210207604709b966fdf3cc0
parent315b748cfc5d64d606d12a73ac81051da32419c3 (diff)
downloadcpython-6d0c4c38d1ba77d1534df130ca101affe98a46ef.zip
cpython-6d0c4c38d1ba77d1534df130ca101affe98a46ef.tar.gz
cpython-6d0c4c38d1ba77d1534df130ca101affe98a46ef.tar.bz2
asyncio.test_pep492: Add a test for asyncio.iscoroutinefunction
-rw-r--r--Lib/test/test_asyncio/test_pep492.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_asyncio/test_pep492.py b/Lib/test/test_asyncio/test_pep492.py
index 5c7e9ae..b702efc 100644
--- a/Lib/test/test_asyncio/test_pep492.py
+++ b/Lib/test/test_asyncio/test_pep492.py
@@ -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):