@@ -379,7 +379,6 @@ def foo():
379
379
self .assertAlmostEqual (0.1 , loop .time ())
380
380
self .assertEqual (foo_running , False )
381
381
382
-
383
382
def test_wait_for_blocking (self ):
384
383
loop = test_utils .TestLoop ()
385
384
self .addCleanup (loop .close )
@@ -388,7 +387,9 @@ def test_wait_for_blocking(self):
388
387
def coro ():
389
388
return 'done'
390
389
391
- res = loop .run_until_complete (asyncio .wait_for (coro (), timeout = None , loop = loop ))
390
+ res = loop .run_until_complete (asyncio .wait_for (coro (),
391
+ timeout = None ,
392
+ loop = loop ))
392
393
self .assertEqual (res , 'done' )
393
394
394
395
def test_wait_for_with_global_loop (self ):
@@ -490,7 +491,7 @@ def test_wait_errors(self):
490
491
self .assertRaises (
491
492
ValueError , self .loop .run_until_complete ,
492
493
asyncio .wait ([asyncio .sleep (10.0 , loop = self .loop )],
493
- return_when = - 1 , loop = self .loop ))
494
+ return_when = - 1 , loop = self .loop ))
494
495
495
496
def test_wait_first_completed (self ):
496
497
@@ -508,7 +509,7 @@ def gen():
508
509
b = asyncio .Task (asyncio .sleep (0.1 , loop = loop ), loop = loop )
509
510
task = asyncio .Task (
510
511
asyncio .wait ([b , a ], return_when = asyncio .FIRST_COMPLETED ,
511
- loop = loop ),
512
+ loop = loop ),
512
513
loop = loop )
513
514
514
515
done , pending = loop .run_until_complete (task )
@@ -540,7 +541,7 @@ def coro2():
540
541
b = asyncio .Task (coro2 (), loop = self .loop )
541
542
task = asyncio .Task (
542
543
asyncio .wait ([b , a ], return_when = asyncio .FIRST_COMPLETED ,
543
- loop = self .loop ),
544
+ loop = self .loop ),
544
545
loop = self .loop )
545
546
546
547
done , pending = self .loop .run_until_complete (task )
@@ -570,7 +571,7 @@ def exc():
570
571
b = asyncio .Task (exc (), loop = loop )
571
572
task = asyncio .Task (
572
573
asyncio .wait ([b , a ], return_when = asyncio .FIRST_EXCEPTION ,
573
- loop = loop ),
574
+ loop = loop ),
574
575
loop = loop )
575
576
576
577
done , pending = loop .run_until_complete (task )
@@ -604,7 +605,7 @@ def exc():
604
605
605
606
b = asyncio .Task (exc (), loop = loop )
606
607
task = asyncio .wait ([b , a ], return_when = asyncio .FIRST_EXCEPTION ,
607
- loop = loop )
608
+ loop = loop )
608
609
609
610
done , pending = loop .run_until_complete (task )
610
611
self .assertEqual ({b }, done )
@@ -670,7 +671,7 @@ def gen():
670
671
@asyncio .coroutine
671
672
def foo ():
672
673
done , pending = yield from asyncio .wait ([b , a ], timeout = 0.11 ,
673
- loop = loop )
674
+ loop = loop )
674
675
self .assertEqual (done , set ([a ]))
675
676
self .assertEqual (pending , set ([b ]))
676
677
@@ -874,7 +875,7 @@ def gen():
874
875
self .addCleanup (loop .close )
875
876
876
877
t = asyncio .Task (asyncio .sleep (10.0 , 'yeah' , loop = loop ),
877
- loop = loop )
878
+ loop = loop )
878
879
879
880
handle = None
880
881
orig_call_later = loop .call_later
@@ -1156,7 +1157,7 @@ def coro2(loop):
1156
1157
task2 = asyncio .Task (coro2 (self .loop ), loop = self .loop )
1157
1158
1158
1159
self .loop .run_until_complete (asyncio .wait ((task1 , task2 ),
1159
- loop = self .loop ))
1160
+ l
81D6
oop = self .loop ))
1160
1161
self .assertIsNone (asyncio .Task .current_task (loop = self .loop ))
1161
1162
1162
1163
# Some thorough tests for cancellation propagation through
@@ -1367,7 +1368,7 @@ def test_one_exception(self):
1367
1368
def test_return_exceptions (self ):
1368
1369
a , b , c , d = [asyncio .Future (loop = self .one_loop ) for i in range (4 )]
1369
1370
fut = asyncio .gather (* self .wrap_futures (a , b , c , d ),
1370
- return_exceptions = True )
1371
+ return_exceptions = True )
1371
1372
cb = Mock ()
1372
1373
fut .add_done_callback (cb )
1373
1374
exc = ZeroDivisionError ()
0 commit comments