@@ -155,7 +155,7 @@ async def run():
155
155
self .loop .run_until_complete (
156
156
asyncio .gather (* [
157
157
self .new_task (self .loop , run ()) for _ in range (100 )
158
- ], loop = self . loop ))
158
+ ]))
159
159
160
160
def test_other_loop_future (self ):
161
161
other_loop = asyncio .new_event_loop ()
@@ -2519,7 +2519,8 @@ def test_cancel_gather_1(self):
2519
2519
# gathering task is done at the same time as the child future
2520
2520
def child_coro ():
2521
2521
return (yield from fut )
2522
- gather_future = asyncio .gather (child_coro (), loop = loop )
2522
+ with self .assertWarns (DeprecationWarning ):
2523
+ gather_future = asyncio .gather (child_coro (), loop = loop )
2523
2524
gather_task = asyncio .ensure_future (gather_future , loop = loop )
2524
2525
2525
2526
cancel_result = None
@@ -2555,7 +2556,8 @@ async def test():
2555
2556
time = 0
2556
2557
while True :
2557
2558
time += 0.05
2558
- await asyncio .gather (asyncio .sleep (0.05 ),
2559
+ with self .assertWarns (DeprecationWarning ):
2560
+ await asyncio .gather (asyncio .sleep (0.05 ),
2559
2561
return_exceptions = True ,
2560
2562
loop = loop )
2561
2563
if time > 1 :
@@ -2773,7 +2775,7 @@ async def main():
2773
2775
task = loop .create_task (sub (random .randint (0 , 10 )))
2774
2776
tasks .append (task )
2775
2777
2776
- await asyncio .gather (* tasks , loop = loop )
2778
+ await asyncio .gather (* tasks )
2777
2779
2778
2780
loop = asyncio .new_event_loop ()
2779
2781
try :
0 commit comments