mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
asyncio, Tulip issue 177: Rewite repr() of Future, Task, Handle and TimerHandle
- Uniformize repr() output to format "<Class ...>" - On Python 3.5+, repr(Task) uses the qualified name instead of the short name of the coroutine
This commit is contained in:
parent
65c623de74
commit
975735f729
7 changed files with 232 additions and 129 deletions
|
@ -1016,14 +1016,14 @@ class BaseEventLoopWithSelectorTests(test_utils.TestCase):
|
|||
self.loop.run_forever()
|
||||
fmt, *args = m_logger.warning.call_args[0]
|
||||
self.assertRegex(fmt % tuple(args),
|
||||
"^Executing Handle.*stop_loop_cb.* took .* seconds$")
|
||||
"^Executing <Handle.*stop_loop_cb.*> took .* seconds$")
|
||||
|
||||
# slow task
|
||||
asyncio.async(stop_loop_coro(self.loop), loop=self.loop)
|
||||
self.loop.run_forever()
|
||||
fmt, *args = m_logger.warning.call_args[0]
|
||||
self.assertRegex(fmt % tuple(args),
|
||||
"^Executing Task.*stop_loop_coro.* took .* seconds$")
|
||||
"^Executing <Task.*stop_loop_coro.*> took .* seconds$")
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue