Skip to content

Commit c1cc247

Browse files
Apply suggestions from code review
Co-authored-by: Sam Bull <[email protected]>
1 parent c0f885b commit c1cc247

5 files changed

Lines changed: 1 addition & 8 deletions

File tree

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
from aiohttp.compression_utils import ZLibBackend, ZLibBackendProtocol, set_zlib_backend
3838
from aiohttp.helpers import TimerNoop
3939
from aiohttp.http import WS_KEY, HttpVersion11
40-
from aiohttp.test_utils import REUSE_ADDRESS, get_unused_port_socket, loop_context
40+
from aiohttp.test_utils import REUSE_ADDRESS, loop_context
4141

4242

4343
def pytest_configure(config: pytest.Config) -> None:

tests/test_client_request.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2120,7 +2120,6 @@ async def test_content_length_with_async_iterable(
21202120
make_client_request: _RequestMaker,
21212121
) -> None:
21222122
"""Test that async iterables use chunked encoding, not Content-Length."""
2123-
21242123
loop = asyncio.get_running_loop()
21252124

21262125
async def data_gen() -> AsyncIterator[bytes]:

tests/test_client_ws_functional.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1377,7 +1377,6 @@ async def handler(request: web.Request) -> NoReturn:
13771377

13781378
async def test_websocket_connection_cancellation(aiohttp_client: AiohttpClient) -> None:
13791379
"""Test canceling the WebSocket connection task does not raise an exception in __del__."""
1380-
13811380
loop = asyncio.get_running_loop()
13821381

13831382
async def handler(request: web.Request) -> NoReturn:

tests/test_connector.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2835,7 +2835,6 @@ async def test_multiple_dns_resolution_requests_success(
28352835
make_client_request: _RequestMaker,
28362836
) -> None:
28372837
"""Verify that multiple DNS resolution requests are handled correctly."""
2838-
28392838
loop = asyncio.get_running_loop()
28402839

28412840
async def delay_resolve(*args: object, **kwargs: object) -> list[ResolveResult]:
@@ -2899,7 +2898,6 @@ async def test_multiple_dns_resolution_requests_failure(
28992898
make_client_request: _RequestMaker,
29002899
) -> None:
29012900
"""Verify that DNS resolution failure for multiple requests is handled correctly."""
2902-
29032901
loop = asyncio.get_running_loop()
29042902

29052903
async def delay_resolve(*args: object, **kwargs: object) -> list[ResolveResult]:
@@ -2954,7 +2952,6 @@ async def test_multiple_dns_resolution_requests_cancelled(
29542952
make_client_request: _RequestMaker,
29552953
) -> None:
29562954
"""Verify that DNS resolution cancellation does not affect other tasks."""
2957-
29582955
loop = asyncio.get_running_loop()
29592956

29602957
async def delay_resolve(*args: object, **kwargs: object) -> list[ResolveResult]:
@@ -3008,7 +3005,6 @@ async def test_multiple_dns_resolution_requests_first_cancelled(
30083005
make_client_request: _RequestMaker,
30093006
) -> None:
30103007
"""Verify that first DNS resolution cancellation does not make other resolutions fail."""
3011-
30123008
loop = asyncio.get_running_loop()
30133009

30143010
async def delay_resolve(*args: object, **kwargs: object) -> list[ResolveResult]:

tests/test_web_middleware.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import asyncio
21
from collections.abc import Awaitable, Callable, Iterable
32
from typing import NoReturn
43

0 commit comments

Comments
 (0)