Apply simplify pass: delete ELF before compile, reuse esphome.helpers, hoist prefs isolation fixture

This commit is contained in:
J. Nick Koston
2026-09-03 17:44:36 +02:00
parent e1595cb7ef
commit bca4c9dbba
7 changed files with 106 additions and 193 deletions
@@ -11,14 +11,6 @@ from .state_utils import InitialStateHelper, require_entity
from .types import APIClientConnectedFactory, RunCompiledFunction
@pytest.fixture(autouse=True)
def isolated_preferences(monkeypatch: pytest.MonkeyPatch, tmp_path) -> None:
"""Keep host preferences per-test so RESTORE_AND_ON never loads a stale value left
behind by a previous run (host preferences otherwise persist to ~/.esphome/prefs,
keyed only by device name)."""
monkeypatch.setenv("ESPHOME_PREFDIR", str(tmp_path / "prefs"))
@pytest.mark.asyncio
async def test_light_initial_state(
yaml_config: str,