Issue #28703: Fix asyncio.iscoroutinefunction to handle Mock objects.

This commit is contained in:
Yury Selivanov 2016-11-15 15:20:34 -05:00
parent 2f84144235
commit 0ed20cdfb7
3 changed files with 18 additions and 2 deletions

View file

@ -1376,6 +1376,8 @@ class TaskTests(test_utils.TestCase):
yield
self.assertTrue(asyncio.iscoroutinefunction(fn2))
self.assertFalse(asyncio.iscoroutinefunction(mock.Mock()))
def test_yield_vs_yield_from(self):
fut = asyncio.Future(loop=self.loop)