Skip to content

Commit

Permalink
chore(test): update pytest and unpin max version (#3925)
Browse files Browse the repository at this point in the history
* chore(test): update `pytest` and unpin max version

* fix: additional test modification
  • Loading branch information
cofin authored Jan 5, 2025
1 parent 8ac019d commit f5ba3a7
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ linting = [
]
test = [
"covdefaults",
"pytest<8.0.0",
"pytest",
"pytest-asyncio",
"pytest-cov",
"pytest-lazy-fixtures",
Expand Down
8 changes: 4 additions & 4 deletions tests/unit/test_openapi/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,14 @@ def get_pets_or_owners(self) -> List[Union[DataclassPerson, DataclassPet]]:


@pytest.fixture
@pytest.mark.usefixtures("disable_warn_implicit_sync_to_thread")
def person_controller() -> Type[Controller]:
def person_controller(disable_warn_implicit_sync_to_thread: None) -> Type[Controller]:
"""Fixture without a top-level mark."""
return create_person_controller()


@pytest.fixture
@pytest.mark.usefixtures("disable_warn_implicit_sync_to_thread")
def pet_controller() -> Type[Controller]:
def pet_controller(disable_warn_implicit_sync_to_thread: None) -> Type[Controller]:
"""Fixture without a top-level mark."""
return create_pet_controller()


Expand Down
5 changes: 2 additions & 3 deletions tests/unit/test_typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
from litestar.exceptions import LitestarWarning
from litestar.params import DependencyKwarg, KwargDefinition, Parameter, ParameterKwarg
from litestar.typing import FieldDefinition

from .test_utils.test_signature import T, _check_field_definition, field_definition_int, test_type_hints
from tests.unit.test_utils.test_signature import T, _check_field_definition, field_definition_int, test_type_hints


@pytest.mark.parametrize(
Expand Down Expand Up @@ -440,7 +439,7 @@ def test_field_definition_get_type_hints_dont_resolve_generics(


def test_warn_ambiguous_default_values() -> None:
with pytest.warns(LitestarWarning, match="Ambiguous default values"):
with pytest.warns((LitestarWarning, DeprecationWarning)):
FieldDefinition.from_annotation(Annotated[int, Parameter(default=1)], default=2)


Expand Down
11 changes: 6 additions & 5 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f5ba3a7

Please sign in to comment.