From: Yury Selivanov Date: Wed, 24 Jun 2015 14:55:12 +0000 (-0400) Subject: Issue #24495, #24400: Test asyncio.Task.repr in debug mode X-Git-Tag: v3.5.0b3~49 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fcba97242b5ff446849e704926f51ce61355ee0b;p=thirdparty%2FPython%2Fcpython.git Issue #24495, #24400: Test asyncio.Task.repr in debug mode --- diff --git a/Lib/test/test_asyncio/test_pep492.py b/Lib/test/test_asyncio/test_pep492.py index c7d5f217ce6b..fe69d32896fd 100644 --- a/Lib/test/test_asyncio/test_pep492.py +++ b/Lib/test/test_asyncio/test_pep492.py @@ -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()