mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
parent
5ac716251f
commit
fcba97242b
1 changed files with 7 additions and 0 deletions
|
|
@ -156,6 +156,13 @@ class CoroutineTests(BaseTest):
|
|||
self.loop.set_debug(True)
|
||||
self.loop.run_until_complete(start())
|
||||
|
||||
async def start():
|
||||
foo_coro = foo()
|
||||
task = asyncio.ensure_future(foo_coro, loop=self.loop)
|
||||
self.assertRegex(repr(task), r'Task.*foo.*running')
|
||||
|
||||
self.loop.run_until_complete(start())
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue