diff options
author | Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> | 2023-03-16 14:58:10 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-16 14:58:10 (GMT) |
commit | adaed17341e649fabb0f522e9b4f5962fcdf1d48 (patch) | |
tree | e272950f38c6ab240568898c91e61e7f9478a461 /Lib/test/test_asyncio | |
parent | fbe82fdd777cead5d6e08ac0d1da19738c19bd81 (diff) | |
download | cpython-adaed17341e649fabb0f522e9b4f5962fcdf1d48.zip cpython-adaed17341e649fabb0f522e9b4f5962fcdf1d48.tar.gz cpython-adaed17341e649fabb0f522e9b4f5962fcdf1d48.tar.bz2 |
GH-102748: remove legacy support for generator based coroutines from `asyncio.iscoroutine` (#102749)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Diffstat (limited to 'Lib/test/test_asyncio')
-rw-r--r-- | Lib/test/test_asyncio/test_pep492.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_asyncio/test_pep492.py b/Lib/test/test_asyncio/test_pep492.py index f833f78..dc25a46 100644 --- a/Lib/test/test_asyncio/test_pep492.py +++ b/Lib/test/test_asyncio/test_pep492.py @@ -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)) |