Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions aiohttp/pytest_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ async def finalize() -> None:


@pytest.fixture
def aiohttp_client_cls() -> Type[TestClient[Any, Any]]: # type: ignore[misc]
def aiohttp_client_cls() -> Type[TestClient[Any, Any]]:
"""
Client class to use in ``aiohttp_client`` factory.

Expand All @@ -388,7 +388,7 @@ def test_login(aiohttp_client):


@pytest.fixture
def aiohttp_client( # type: ignore[misc]
def aiohttp_client(
loop: asyncio.AbstractEventLoop, aiohttp_client_cls: Type[TestClient[Any, Any]]
) -> Iterator[AiohttpClient]:
"""Factory to create a TestClient instance.
Expand Down
7 changes: 6 additions & 1 deletion requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ pyenchant==3.2.2
# via sphinxcontrib-spelling
pygments==2.19.1
# via
# pytest
# rich
# sphinx
pyjwt==2.8.0
Expand All @@ -177,7 +178,7 @@ pyproject-hooks==1.2.0
# via
# build
# pip-tools
pytest==8.1.1
pytest==8.4.1
# via
# -r requirements/lint.in
# -r requirements/test.in
Expand Down Expand Up @@ -299,6 +300,10 @@ zlib-ng==0.5.1
# via
# -r requirements/lint.in
# -r requirements/test.in
zstandard==0.23.0 ; implementation_name == "cpython"
# via
# -r requirements/lint.in
# -r requirements/runtime-deps.in

# The following packages are considered to be unsafe in a requirements file:
pip==25.1.1
Expand Down
7 changes: 6 additions & 1 deletion requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ pydantic-core==2.33.2
# via pydantic
pygments==2.19.1
# via
# pytest
# rich
# sphinx
pyjwt==2.8.0
Expand All @@ -172,7 +173,7 @@ pyproject-hooks==1.2.0
# via
# build
# pip-tools
pytest==8.1.1
pytest==8.4.1
# via
# -r requirements/lint.in
# -r requirements/test.in
Expand Down Expand Up @@ -290,6 +291,10 @@ zlib-ng==0.5.1
# via
# -r requirements/lint.in
# -r requirements/test.in
zstandard==0.23.0 ; platform_python_implementation == "CPython" and python_version < "3.14"
# via
# -r requirements/lint.in
# -r requirements/runtime-deps.in

# The following packages are considered to be unsafe in a requirements file:
pip==25.1.1
Expand Down
17 changes: 15 additions & 2 deletions requirements/lint.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ aiodns==3.5.0
# via -r requirements/lint.in
annotated-types==0.7.0
# via pydantic
async-timeout==5.0.1
# via valkey
blockbuster==1.5.24
# via -r requirements/lint.in
cffi==1.17.1
Expand All @@ -23,6 +25,8 @@ cryptography==45.0.4
# via trustme
distlib==0.3.9
# via virtualenv
exceptiongroup==1.3.0
# via pytest
filelock==3.18.0
# via virtualenv
forbiddenfruit==0.1.4
Expand Down Expand Up @@ -68,8 +72,10 @@ pydantic==2.11.7
pydantic-core==2.33.2
# via pydantic
pygments==2.19.1
# via rich
pytest==8.1.1
# via
# pytest
# rich
pytest==8.4.1
# via
# -r requirements/lint.in
# pytest-codspeed
Expand All @@ -90,14 +96,21 @@ six==1.17.0
# via python-dateutil
slotscheck==0.19.1
# via -r requirements/lint.in
tomli==2.2.1
# via
# mypy
# pytest
# slotscheck
trustme==1.2.1
# via -r requirements/lint.in
typing-extensions==4.14.0
# via
# exceptiongroup
# mypy
# pydantic
# pydantic-core
# python-on-whales
# rich
# typing-inspection
typing-inspection==0.4.1
# via pydantic
Expand Down
8 changes: 6 additions & 2 deletions requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,10 @@ pydantic==2.11.7
pydantic-core==2.33.2
# via pydantic
pygments==2.19.1
# via rich
pytest==8.1.1
# via
# pytest
# rich
pytest==8.4.1
# via
# -r requirements/test.in
# pytest-codspeed
Expand Down Expand Up @@ -145,3 +147,5 @@ yarl==1.20.1
# via -r requirements/runtime-deps.in
zlib-ng==0.5.1
# via -r requirements/test.in
zstandard==0.23.0 ; platform_python_implementation == "CPython" and python_version < "3.14"
# via -r requirements/runtime-deps.in
2 changes: 1 addition & 1 deletion tests/test_client_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def key() -> object:


@pytest.fixture
def loop() -> Any: # type: ignore[misc]
def loop() -> Any:
return mock.create_autospec(asyncio.AbstractEventLoop, spec_set=True, instance=True)


Expand Down
4 changes: 2 additions & 2 deletions tests/test_client_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ async def make_conn() -> BaseConnector:


@pytest.fixture
def create_session( # type: ignore[misc]
def create_session(
loop: asyncio.AbstractEventLoop,
) -> Iterator[Callable[..., Awaitable[ClientSession]]]:
session = None
Expand All @@ -81,7 +81,7 @@ async def maker(*args: Any, **kwargs: Any) -> ClientSession:


@pytest.fixture
def session( # type: ignore[misc]
def session(
create_session: Callable[..., Awaitable[ClientSession]],
loop: asyncio.AbstractEventLoop,
) -> ClientSession:
Expand Down
8 changes: 4 additions & 4 deletions tests/test_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,25 +55,25 @@


@pytest.fixture
def key() -> ConnectionKey: # type: ignore[misc]
def key() -> ConnectionKey:
# Connection key
return ConnectionKey("localhost", 80, False, True, None, None, None)


@pytest.fixture
def key2() -> ConnectionKey: # type: ignore[misc]
def key2() -> ConnectionKey:
# Connection key
return ConnectionKey("localhost", 80, False, True, None, None, None)


@pytest.fixture
def other_host_key2() -> ConnectionKey: # type: ignore[misc]
def other_host_key2() -> ConnectionKey:
# Connection key
return ConnectionKey("otherhost", 80, False, True, None, None, None)


@pytest.fixture
def ssl_key() -> ConnectionKey: # type: ignore[misc]
def ssl_key() -> ConnectionKey:
# Connection key
return ConnectionKey("localhost", 80, True, True, None, None, None)

Expand Down
2 changes: 1 addition & 1 deletion tests/test_http_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@


@pytest.fixture
def protocol() -> Any: # type: ignore[misc]
def protocol() -> Any:
return mock.create_autospec(BaseProtocol, spec_set=True, instance=True)


Expand Down
4 changes: 2 additions & 2 deletions tests/test_http_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def buf() -> bytearray:


@pytest.fixture
def transport(buf: bytearray) -> Any: # type: ignore[misc]
def transport(buf: bytearray) -> Any:
transport = mock.create_autospec(asyncio.Transport, spec_set=True, instance=True)

def write(chunk: bytes) -> None:
Expand All @@ -55,7 +55,7 @@ def writelines(chunks: Iterable[bytes]) -> None:


@pytest.fixture
def protocol(loop: asyncio.AbstractEventLoop, transport: asyncio.Transport) -> Any: # type: ignore[misc]
def protocol(loop: asyncio.AbstractEventLoop, transport: asyncio.Transport) -> Any:
return mock.create_autospec(
BaseProtocol, spec_set=True, instance=True, transport=transport
)
Expand Down
1 change: 1 addition & 0 deletions tests/test_test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ async def test_server_make_url_yarl_compatibility(
make_url(URL("http://foo.com"))


@pytest.mark.xfail(reason="https://github.com/pytest-dev/pytest/issues/13546")
def test_testcase_no_app(
testdir: pytest.Testdir, loop: asyncio.AbstractEventLoop
) -> None:
Expand Down
Loading