diff --git a/setup.cfg b/setup.cfg index 9069827..9d3fa2e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -15,10 +15,13 @@ classifier = Topic :: Home Automation [tool:pytest] +asyncio_mode = auto +asyncio_default_fixture_loop_scope = function testpaths = tests norecursedirs = .git log_level=INFO addopts = + -p no:respx --strict-markers --asyncio-mode=auto diff --git a/tests/requirements_test.txt b/tests/requirements_test.txt index 5089b25..04fd004 100644 --- a/tests/requirements_test.txt +++ b/tests/requirements_test.txt @@ -6,7 +6,7 @@ mypy==1.10.1 pre-commit==3.7.1 pytest==9.0.3 pytest-cov==7.1.0 -pytest-homeassistant-custom-component==0.13.326 +pytest-homeassistant==2026.11.0 ruff==0.15.12 pylint==3.3.4 pylint-strict-informational==0.1 diff --git a/tests/test_config_flow.py b/tests/test_config_flow.py index a59ed83..67bf165 100644 --- a/tests/test_config_flow.py +++ b/tests/test_config_flow.py @@ -21,7 +21,7 @@ @pytest.fixture(name="pyscript_bypass_setup") def pyscript_bypass_setup_fixture(): """Mock component setup.""" - logging.getLogger("pytest_homeassistant_custom_component.common").setLevel(logging.WARNING) + logging.getLogger("pytest_homeassistant.common").setLevel(logging.WARNING) with patch("custom_components.pyscript.async_setup_entry", return_value=True): yield diff --git a/tests/test_init.py b/tests/test_init.py index 5b43ea3..98cd0ac 100644 --- a/tests/test_init.py +++ b/tests/test_init.py @@ -7,7 +7,7 @@ from unittest.mock import mock_open, patch import pytest -from pytest_homeassistant_custom_component.common import mock_restore_cache +from pytest_homeassistant.common import mock_restore_cache from custom_components.pyscript import restore_state, trigger from custom_components.pyscript.const import DOMAIN diff --git a/tests/test_requirements.py b/tests/test_requirements.py index 2ca4c33..fa8ebfc 100644 --- a/tests/test_requirements.py +++ b/tests/test_requirements.py @@ -5,7 +5,7 @@ import pytest from pytest import fixture -from pytest_homeassistant_custom_component.common import MockConfigEntry +from pytest_homeassistant.common import MockConfigEntry from custom_components.pyscript.const import ( ATTR_INSTALLED_VERSION, diff --git a/tests/test_unit_eval.py b/tests/test_unit_eval.py index 8638e18..27ee386 100644 --- a/tests/test_unit_eval.py +++ b/tests/test_unit_eval.py @@ -4,7 +4,7 @@ from types import ModuleType import pytest -from pytest_homeassistant_custom_component.common import MockConfigEntry +from pytest_homeassistant.common import MockConfigEntry from custom_components.pyscript import DecoratorRegistry from custom_components.pyscript.const import CONF_ALLOW_ALL_IMPORTS, CONFIG_ENTRY, DOMAIN