mirror of
https://github.com/home-assistant/core.git
synced 2025-07-20 19:57:07 +00:00
Small improvement to test run time (#113175)
This commit is contained in:
parent
5ab7cb6ddd
commit
1cceaaf193
@ -295,7 +295,9 @@ async def async_test_home_assistant(
|
||||
},
|
||||
)
|
||||
hass.bus.async_listen_once(
|
||||
EVENT_HOMEASSISTANT_STOP, hass.config_entries._async_shutdown
|
||||
EVENT_HOMEASSISTANT_STOP,
|
||||
hass.config_entries._async_shutdown,
|
||||
run_immediately=True,
|
||||
)
|
||||
|
||||
# Load the registries
|
||||
@ -878,7 +880,9 @@ class MockEntityPlatform(entity_platform.EntityPlatform):
|
||||
def _async_on_stop(_: Event) -> None:
|
||||
self.async_shutdown()
|
||||
|
||||
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, _async_on_stop)
|
||||
hass.bus.async_listen_once(
|
||||
EVENT_HOMEASSISTANT_STOP, _async_on_stop, run_immediately=True
|
||||
)
|
||||
|
||||
|
||||
class MockToggleEntity(entity.ToggleEntity):
|
||||
|
Loading…
x
Reference in New Issue
Block a user