diff --git a/test-requirements.txt b/test-requirements.txt index a8ec70f..e119b67 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,13 +1,13 @@ codespell==2.4.1 coveralls==4.0.1 -mypy==1.16.1 -pre-commit==4.2.0 -pydantic==2.11.7 -pylint==3.3.7 -pylint-per-file-ignores==1.4.0 -pytest==8.4.1 -pytest-asyncio==1.0.0 -pytest-cov==6.2.1 +mypy==1.18.2 +pre-commit==4.3.0 +pydantic==2.12.0 +pylint==3.3.9 +pylint-per-file-ignores==3.0.0 +pytest==8.4.2 +pytest-asyncio==1.2.0 +pytest-cov==7.0.0 pytest-timeout==2.4.0 -ruff==0.12.3 -syrupy==4.9.1 \ No newline at end of file +ruff==0.14.0 +syrupy==5.0.0 \ No newline at end of file diff --git a/tests/__init__.py b/tests/__init__.py index 5000c5c..fdcc423 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -61,7 +61,7 @@ class ArgumentValue: def get_value(self, args: dict[str, Any]) -> Any: """Get the value.""" if self.value: - return value + return self.value assert self.arg_name is not None arg_value = args[self.arg_name] if self.formatter == "on_off": @@ -159,7 +159,7 @@ async def wrapped(*args: Any, **kwargs: Any) -> Any: return wrapper -def value( +def value_source( *, value: Any | None = None, arg_name: str | None = None, diff --git a/tests/conftest.py b/tests/conftest.py index bd6b87f..7581fcc 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -21,8 +21,8 @@ from . import MockHeos, MockHeosDevice -@pytest.fixture -def snapshot(snapshot: SnapshotAssertion) -> SnapshotAssertion: +@pytest.fixture(name="snapshot") +def snapshot_fixture(snapshot: SnapshotAssertion) -> SnapshotAssertion: """Return snapshot assertion fixture with the Heos extension.""" return snapshot.use_extension(HeosSnapshotExtension) diff --git a/tests/test_group.py b/tests/test_group.py index c713a77..ac23c31 100644 --- a/tests/test_group.py +++ b/tests/test_group.py @@ -8,7 +8,8 @@ from pyheos.group import HeosGroup from pyheos.heos import Heos from pyheos.message import HeosMessage -from tests import CallCommand, calls_command, calls_commands, value +from tests import CallCommand, calls_command, calls_commands +from tests import value_source as value def test_group_from_data_no_leader_raises() -> None: diff --git a/tests/test_heos_browse.py b/tests/test_heos_browse.py index c53e0db..c45f240 100644 --- a/tests/test_heos_browse.py +++ b/tests/test_heos_browse.py @@ -29,7 +29,8 @@ from pyheos.heos import Heos from pyheos.media import MediaMusicSource from pyheos.options import HeosOptions -from tests import calls_command, value +from tests import calls_command +from tests import value_source as value from tests.common import MediaMusicSources diff --git a/tests/test_player.py b/tests/test_player.py index db4cbf4..5e3fd37 100644 --- a/tests/test_player.py +++ b/tests/test_player.py @@ -17,7 +17,8 @@ from pyheos.media import MediaItem from pyheos.player import HeosPlayer from pyheos.types import AddCriteriaType, PlayState, RepeatType -from tests import CallCommand, calls_command, calls_commands, value +from tests import CallCommand, calls_command, calls_commands +from tests import value_source as value from tests.common import MediaItems