Skip to content

Commit 2c6c30e

Browse files
committed
fix warnings
1 parent 254a312 commit 2c6c30e

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ check_untyped_defs = true
7373

7474
[tool.pytest.ini_options]
7575
asyncio_mode = "auto"
76+
asyncio_default_fixture_loop_scope = "function"
7677

7778
[tool.deptry.per_rule_ignores]
7879
DEP002 = ["pytest-asyncio", "coverage", "pytest-aiohttp", "mypy", "ruff", "deptry"]

tests/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def response_simple(request_simple: RequestData) -> Response[Any]:
4545

4646
@pytest.fixture
4747
async def dummy_server(
48-
aiohttp_unused_port, aiohttp_server
48+
unused_tcp_port_factory, aiohttp_server
4949
) -> AsyncIterable[TestServer]:
5050
app = web.Application()
5151

@@ -54,5 +54,5 @@ async def get(request):
5454

5555
app.router.add_get("/get", get)
5656

57-
server = await aiohttp_server(app, port=aiohttp_unused_port())
57+
server = await aiohttp_server(app, port=unused_tcp_port_factory())
5858
yield server

0 commit comments

Comments
 (0)