From 327796a7502393ae0158c69cff5a18afbef22dec Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 28 Feb 2024 09:03:21 -1000 Subject: [PATCH] Eagerly unload config entries in tests (#111707) This is a small latancy reduction to reduce test wall clock time since it runs every test --- tests/conftest.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index c8ca143094a..18645034c29 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -63,6 +63,7 @@ from homeassistant.helpers import ( from homeassistant.helpers.typing import ConfigType from homeassistant.setup import BASE_PLATFORMS, async_setup_component from homeassistant.util import location +from homeassistant.util.async_ import create_eager_task from homeassistant.util.json import json_loads from .ignore_uncaught_exceptions import IGNORE_UNCAUGHT_EXCEPTIONS @@ -555,7 +556,7 @@ async def hass( # to ensure that they could, and to help track lingering tasks and timers. await asyncio.gather( *( - config_entry.async_unload(hass) + create_eager_task(config_entry.async_unload(hass)) for config_entry in hass.config_entries.async_entries() ) )