mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 19:27:45 +00:00
Reduce scope of test fixtures for the pylint plugin tests (#116207)
This commit is contained in:
parent
381ffe6eed
commit
0425b7aa6d
@ -26,7 +26,7 @@ def _load_plugin_from_file(module_name: str, file: str) -> ModuleType:
|
|||||||
return module
|
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:
|
def hass_enforce_type_hints_fixture() -> ModuleType:
|
||||||
"""Fixture to provide a requests mocker."""
|
"""Fixture to provide a requests mocker."""
|
||||||
return _load_plugin_from_file(
|
return _load_plugin_from_file(
|
||||||
@ -49,7 +49,7 @@ def type_hint_checker_fixture(hass_enforce_type_hints, linter) -> BaseChecker:
|
|||||||
return type_hint_checker
|
return type_hint_checker
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(name="hass_imports", scope="session")
|
@pytest.fixture(name="hass_imports", scope="package")
|
||||||
def hass_imports_fixture() -> ModuleType:
|
def hass_imports_fixture() -> ModuleType:
|
||||||
"""Fixture to provide a requests mocker."""
|
"""Fixture to provide a requests mocker."""
|
||||||
return _load_plugin_from_file(
|
return _load_plugin_from_file(
|
||||||
@ -66,7 +66,7 @@ def imports_checker_fixture(hass_imports, linter) -> BaseChecker:
|
|||||||
return type_hint_checker
|
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:
|
def hass_enforce_super_call_fixture() -> ModuleType:
|
||||||
"""Fixture to provide a requests mocker."""
|
"""Fixture to provide a requests mocker."""
|
||||||
return _load_plugin_from_file(
|
return _load_plugin_from_file(
|
||||||
@ -83,7 +83,7 @@ def super_call_checker_fixture(hass_enforce_super_call, linter) -> BaseChecker:
|
|||||||
return super_call_checker
|
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:
|
def hass_enforce_sorted_platforms_fixture() -> ModuleType:
|
||||||
"""Fixture to the content for the hass_enforce_sorted_platforms check."""
|
"""Fixture to the content for the hass_enforce_sorted_platforms check."""
|
||||||
return _load_plugin_from_file(
|
return _load_plugin_from_file(
|
||||||
@ -104,7 +104,7 @@ def enforce_sorted_platforms_checker_fixture(
|
|||||||
return enforce_sorted_platforms_checker
|
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:
|
def hass_enforce_coordinator_module_fixture() -> ModuleType:
|
||||||
"""Fixture to the content for the hass_enforce_coordinator_module check."""
|
"""Fixture to the content for the hass_enforce_coordinator_module check."""
|
||||||
return _load_plugin_from_file(
|
return _load_plugin_from_file(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user