mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
asyncio, Tulip issue 206: In debug mode, keep the callback in the
representation of Handle and TimerHandle after cancel().
This commit is contained in:
parent
86c9e1877c
commit
1b38bc65dd
2 changed files with 24 additions and 17 deletions
|
@ -1891,8 +1891,8 @@ class HandleTests(test_utils.TestCase):
|
|||
# cancelled handle
|
||||
h.cancel()
|
||||
self.assertEqual(repr(h),
|
||||
'<Handle cancelled created at %s:%s>'
|
||||
% (create_filename, create_lineno))
|
||||
'<Handle cancelled noop(1, 2) at %s:%s created at %s:%s>'
|
||||
% (filename, lineno, create_filename, create_lineno))
|
||||
|
||||
def test_handle_source_traceback(self):
|
||||
loop = asyncio.get_event_loop_policy().new_event_loop()
|
||||
|
@ -1987,8 +1987,9 @@ class TimerTests(unittest.TestCase):
|
|||
# cancelled handle
|
||||
h.cancel()
|
||||
self.assertEqual(repr(h),
|
||||
'<TimerHandle cancelled when=123 created at %s:%s>'
|
||||
% (create_filename, create_lineno))
|
||||
'<TimerHandle cancelled when=123 noop() '
|
||||
'at %s:%s created at %s:%s>'
|
||||
% (filename, lineno, create_filename, create_lineno))
|
||||
|
||||
|
||||
def test_timer_comparison(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue