diff options
author | Yury Selivanov <yselivanov@sprymix.com> | 2015-06-24 14:55:12 (GMT) |
---|---|---|
committer | Yury Selivanov <yselivanov@sprymix.com> | 2015-06-24 14:55:12 (GMT) |
commit | fcba97242b5ff446849e704926f51ce61355ee0b (patch) | |
tree | 0f8464d070808dee100278716e9d0352e9b13762 /Lib | |
parent | 5ac716251f9ad96120b70319fcc6be67aa383a6b (diff) | |
download | cpython-fcba97242b5ff446849e704926f51ce61355ee0b.zip cpython-fcba97242b5ff446849e704926f51ce61355ee0b.tar.gz cpython-fcba97242b5ff446849e704926f51ce61355ee0b.tar.bz2 |
Issue #24495, #24400: Test asyncio.Task.repr in debug mode
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_asyncio/test_pep492.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_asyncio/test_pep492.py b/Lib/test/test_asyncio/test_pep492.py index c7d5f21..fe69d32 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() |