diff --git a/tests/pylint/conftest.py b/tests/pylint/conftest.py index 2b0fdcf7df5..90e535a7b0e 100644 --- a/tests/pylint/conftest.py +++ b/tests/pylint/conftest.py @@ -26,7 +26,7 @@ def _load_plugin_from_file(module_name: str, file: str) -> ModuleType: return module -@pytest.fixture(name="hass_enforce_type_hints", scope="session") +@pytest.fixture(name="hass_enforce_type_hints", scope="package") def hass_enforce_type_hints_fixture() -> ModuleType: """Fixture to provide a requests mocker.""" return _load_plugin_from_file( @@ -49,7 +49,7 @@ def type_hint_checker_fixture(hass_enforce_type_hints, linter) -> BaseChecker: return type_hint_checker -@pytest.fixture(name="hass_imports", scope="session") +@pytest.fixture(name="hass_imports", scope="package") def hass_imports_fixture() -> ModuleType: """Fixture to provide a requests mocker.""" return _load_plugin_from_file( @@ -66,7 +66,7 @@ def imports_checker_fixture(hass_imports, linter) -> BaseChecker: return type_hint_checker -@pytest.fixture(name="hass_enforce_super_call", scope="session") +@pytest.fixture(name="hass_enforce_super_call", scope="package") def hass_enforce_super_call_fixture() -> ModuleType: """Fixture to provide a requests mocker.""" return _load_plugin_from_file( @@ -83,7 +83,7 @@ def super_call_checker_fixture(hass_enforce_super_call, linter) -> BaseChecker: return super_call_checker -@pytest.fixture(name="hass_enforce_sorted_platforms", scope="session") +@pytest.fixture(name="hass_enforce_sorted_platforms", scope="package") def hass_enforce_sorted_platforms_fixture() -> ModuleType: """Fixture to the content for the hass_enforce_sorted_platforms check.""" return _load_plugin_from_file( @@ -104,7 +104,7 @@ def enforce_sorted_platforms_checker_fixture( return enforce_sorted_platforms_checker -@pytest.fixture(name="hass_enforce_coordinator_module", scope="session") +@pytest.fixture(name="hass_enforce_coordinator_module", scope="package") def hass_enforce_coordinator_module_fixture() -> ModuleType: """Fixture to the content for the hass_enforce_coordinator_module check.""" return _load_plugin_from_file(