mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Improve loops and lists (#113269)
* Enable PERF * Enable PERF rule * Enable PERF rule * Don't enable flag yet
This commit is contained in:
committed by
GitHub
parent
8a98fb7cfd
commit
05172d8e4d
@@ -3915,9 +3915,9 @@ async def test_entry_reload_concurrency(
|
||||
),
|
||||
)
|
||||
mock_platform(hass, "comp.config_flow", None)
|
||||
tasks = []
|
||||
for _ in range(15):
|
||||
tasks.append(asyncio.create_task(manager.async_reload(entry.entry_id)))
|
||||
tasks = [
|
||||
asyncio.create_task(manager.async_reload(entry.entry_id)) for _ in range(15)
|
||||
]
|
||||
await asyncio.gather(*tasks)
|
||||
assert entry.state is config_entries.ConfigEntryState.LOADED
|
||||
assert loaded == 1
|
||||
|
||||
Reference in New Issue
Block a user