diff options
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/asyncio/coroutines.py | 2 | ||||
-rw-r--r-- | Lib/test/test_asyncio/test_pep492.py | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/Lib/asyncio/coroutines.py b/Lib/asyncio/coroutines.py index 896cc56..a70eb1d 100644 --- a/Lib/asyncio/coroutines.py +++ b/Lib/asyncio/coroutines.py @@ -252,6 +252,8 @@ def _format_coroutine(coro): if isinstance(coro, CoroWrapper): func = coro.func coro_name = coro.__qualname__ + if coro_name is not None: + coro_name = '{}()'.format(coro_name) else: func = coro diff --git a/Lib/test/test_asyncio/test_pep492.py b/Lib/test/test_asyncio/test_pep492.py index 82bb995..c7d5f21 100644 --- a/Lib/test/test_asyncio/test_pep492.py +++ b/Lib/test/test_asyncio/test_pep492.py @@ -142,7 +142,7 @@ class CoroutineTests(BaseTest): foo_coro = foo() self.assertRegex( repr(foo_coro), - r'<CoroWrapper .*\.foo running at .*pep492.*>') + r'<CoroWrapper .*\.foo\(\) running at .*pep492.*>') with support.check_warnings((r'.*foo.*was never', RuntimeWarning)): |