File tree Expand file tree Collapse file tree 3 files changed +2
-5
lines changed Expand file tree Collapse file tree 3 files changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -363,7 +363,6 @@ async def test_concurrent_close(aiohttp_client: AiohttpClient) -> None:
363
363
client_ws : Optional [aiohttp .ClientWebSocketResponse ] = None
364
364
365
365
async def handler (request : web .Request ) -> web .WebSocketResponse :
366
- nonlocal client_ws
367
366
ws = web .WebSocketResponse ()
368
367
await ws .prepare (request )
369
368
@@ -960,7 +959,7 @@ async def delayed_send_frame(
960
959
message : bytes , opcode : int , compress : Optional [int ] = None
961
960
) -> None :
962
961
assert opcode == WSMsgType .PING
963
- nonlocal cancelled , ping_started
962
+ nonlocal cancelled
964
963
ping_started .set_result (None )
965
964
try :
966
965
await asyncio .sleep (1 )
Original file line number Diff line number Diff line change @@ -378,7 +378,6 @@ async def test_timer_context_timeout_does_swallow_cancellation() -> None:
378
378
ctx = helpers .TimerContext (loop )
379
379
380
380
async def task_with_timeout () -> None :
381
- nonlocal ctx
382
381
new_task = asyncio .current_task ()
383
382
assert new_task is not None
384
383
with pytest .raises (asyncio .TimeoutError ):
Original file line number Diff line number Diff line change @@ -384,7 +384,6 @@ async def test_handler_cancellation(unused_port_socket: socket.socket) -> None:
384
384
port = sock .getsockname ()[1 ]
385
385
386
386
async def on_request (request : web .Request ) -> web .Response :
387
- nonlocal event
388
387
try :
389
388
await asyncio .sleep (10 )
390
389
except asyncio .CancelledError :
@@ -427,7 +426,7 @@ async def test_no_handler_cancellation(unused_port_socket: socket.socket) -> Non
427
426
started = False
428
427
429
428
async def on_request (request : web .Request ) -> web .Response :
430
- nonlocal done_event , started , timeout_event
429
+ nonlocal started
431
430
started = True
432
431
await asyncio .wait_for (timeout_event .wait (), timeout = 5 )
433
432
done_event .set ()
You can’t perform that action at this time.
0 commit comments