mirror of
https://github.com/home-assistant/core.git
synced 2025-07-29 18:28:14 +02:00
Add support for importing integrations in the executor (#111336)
* Add support for pre-imports at setup time alternative solution to #111331 * refactor * refactor * refactor * mark >1.0s integrations * no point in executor if already loaded * no point in executor if already loaded * cleanup * cleanup * two more * one more * analytics loads a lot more integrations * cloud * debug * psutil, hardwre * try zha * Update homeassistant/setup.py * await * comments * coverage * coverage * coverage * move logic to loader * move logic to loader * preserve comments
This commit is contained in:
@ -813,3 +813,12 @@ async def test_loading_component_loads_translations(hass: HomeAssistant) -> None
|
||||
assert await setup.async_setup_component(hass, "comp", {})
|
||||
assert mock_setup.called
|
||||
assert translation.async_translations_loaded(hass, {"comp"}) is True
|
||||
|
||||
|
||||
async def test_importing_integration_in_executor(
|
||||
hass: HomeAssistant, enable_custom_integrations: None
|
||||
) -> None:
|
||||
"""Test we can import an integration in an executor."""
|
||||
assert await setup.async_setup_component(hass, "test_package_loaded_executor", {})
|
||||
assert await setup.async_setup_component(hass, "test_package_loaded_executor", {})
|
||||
await hass.async_block_till_done()
|
||||
|
Reference in New Issue
Block a user