mirror of https://github.com/python/cpython
Fix asyncio unittests in debug mode
This commit is contained in:
commit
5ac716251f
|
@ -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
|
||||
|
||||
|
|
|
@ -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)):
|
||||
|
|
Loading…
Reference in New Issue