From b4d01dfd0c3279a87d31b5a1d9a96b25a1f436e5 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Fri, 6 Dec 2024 10:11:52 +0100 Subject: [PATCH] Adjust scope of zha global quirks fixture (#132463) --- tests/components/zha/conftest.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/components/zha/conftest.py b/tests/components/zha/conftest.py index a9f4c51d75d..1b280ea499a 100644 --- a/tests/components/zha/conftest.py +++ b/tests/components/zha/conftest.py @@ -8,6 +8,7 @@ from unittest.mock import AsyncMock, MagicMock, create_autospec, patch import warnings import pytest +import zhaquirks import zigpy from zigpy.application import ControllerApplication import zigpy.backups @@ -38,7 +39,7 @@ FIXTURE_GRP_NAME = "fixture group" COUNTER_NAMES = ["counter_1", "counter_2", "counter_3"] -@pytest.fixture(scope="module", autouse=True) +@pytest.fixture(scope="package", autouse=True) def globally_load_quirks(): """Load quirks automatically so that ZHA tests run deterministically in isolation. @@ -47,8 +48,6 @@ def globally_load_quirks(): run. """ - import zhaquirks # pylint: disable=import-outside-toplevel - zhaquirks.setup()