@@ -162,9 +162,9 @@ def new_eager_loop():
162162 ["c5" , "c4" , "c3" , "c2" ],
163163 "c2_root" ,
164164 [
165- [["main" ], root_task , []],
166- [["c1" ], "sub_main_1" , [[["main" ], root_task , []]]],
167- [["c1" ], "sub_main_2" , [[["main" ], root_task , []]]],
165+ [['_aexit' , '__aexit__' , "main" ], root_task , []],
166+ [["c1" ], "sub_main_1" , [[['_aexit' , '__aexit__' , "main" ], root_task , []]]],
167+ [["c1" ], "sub_main_2" , [[['_aexit' , '__aexit__' , "main" ], root_task , []]]],
168168 ],
169169 ]
170170 self .assertEqual (stack_trace , expected_stack_trace )
@@ -346,7 +346,7 @@ async def main():
346346 stack_trace [2 ].sort (key = lambda x : x [1 ])
347347
348348 expected_stack_trace = [
349- ['deep' , 'c1' , 'run_one_coro' ], 'Task-2' , [[['main' ], 'Task-1' , []]]
349+ ['deep' , 'c1' , 'run_one_coro' ], 'Task-2' , [[['staggered_race' , ' main' ], 'Task-1' , []]]
350350 ]
351351 self .assertEqual (stack_trace , expected_stack_trace )
352352
@@ -456,11 +456,13 @@ async def main():
456456 self .assertGreaterEqual (len (entries ), 1000 )
457457 # the first three tasks stem from the code structure
458458 self .assertIn (('Task-1' , []), entries )
459- self .assertIn (('server task' , [[['main' ], 'Task-1' , []]]), entries )
460- self .assertIn (('echo client spam' , [[['main' ], 'Task-1' , []]]), entries )
459+ self .assertIn (('server task' , [[['_aexit' , '__aexit__' , ' main' ], 'Task-1' , []]]), entries )
460+ self .assertIn (('echo client spam' , [[['_aexit' , '__aexit__' , ' main' ], 'Task-1' , []]]), entries )
461461 # the final task will have some random number, but it should for
462462 # sure be one of the echo client spam horde
463- self .assertEqual ([[['echo_client_spam' ], 'echo client spam' , [[['main' ], 'Task-1' , []]]]], entries [- 1 ][1 ])
463+ self .assertEqual (
464+ [[['_aexit' , '__aexit__' , 'echo_client_spam' ], 'echo client spam' , [[['_aexit' , '__aexit__' , 'main' ], 'Task-1' , []]]]],
465+ entries [- 1 ][1 ])
464466 except PermissionError :
465467 self .skipTest (
466468 "Insufficient permissions to read the stack trace" )
0 commit comments