mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 04:50:05 +00:00
Speed up async_get_loaded_integrations (#117851)
* Speed up async_get_loaded_integrations Use a setcomp and difference to find the components to split to avoid the loop. A setcomp is inlined in python3.12 so its much faster * Speed up async_get_loaded_integrations Use a setcomp and difference to find the components to split to avoid the loop. A setcomp is inlined in python3.12 so its much faster * simplify * fix compat * bootstrap * fix tests
This commit is contained in:
@@ -246,7 +246,7 @@ async def test_send_usage(
|
||||
|
||||
assert analytics.preferences[ATTR_BASE]
|
||||
assert analytics.preferences[ATTR_USAGE]
|
||||
hass.config.components = ["default_config"]
|
||||
hass.config.components.add("default_config")
|
||||
|
||||
with patch(
|
||||
"homeassistant.config.load_yaml_config_file",
|
||||
@@ -280,7 +280,7 @@ async def test_send_usage_with_supervisor(
|
||||
await analytics.save_preferences({ATTR_BASE: True, ATTR_USAGE: True})
|
||||
assert analytics.preferences[ATTR_BASE]
|
||||
assert analytics.preferences[ATTR_USAGE]
|
||||
hass.config.components = ["default_config"]
|
||||
hass.config.components.add("default_config")
|
||||
|
||||
with (
|
||||
patch(
|
||||
@@ -344,7 +344,7 @@ async def test_send_statistics(
|
||||
await analytics.save_preferences({ATTR_BASE: True, ATTR_STATISTICS: True})
|
||||
assert analytics.preferences[ATTR_BASE]
|
||||
assert analytics.preferences[ATTR_STATISTICS]
|
||||
hass.config.components = ["default_config"]
|
||||
hass.config.components.add("default_config")
|
||||
|
||||
with patch(
|
||||
"homeassistant.config.load_yaml_config_file",
|
||||
|
||||
Reference in New Issue
Block a user