mirror of
https://github.com/home-assistant/core.git
synced 2025-07-29 18:28:14 +02:00
Raise and suppress stack trace when reloading yaml fails (#102410)
* Allow async_integration_yaml_config to raise * Docstr - split check * Implement as wrapper, return dataclass * Fix setup error handling * Fix reload test mock * Move log_messages to error handler * Remove unreachable code * Remove config test helper * Refactor and ensure notifications during setup * Remove redundat error, adjust tests notifications * Fix patch * Apply suggestions from code review Co-authored-by: Erik Montnemery <erik@montnemery.com> * Follow up comments * Add call_back decorator * Split long lines * Update exception abbreviations --------- Co-authored-by: Erik Montnemery <erik@montnemery.com>
This commit is contained in:
@ -374,7 +374,7 @@ async def test_platform_specific_config_validation(hass: HomeAssistant) -> None:
|
||||
)
|
||||
|
||||
with assert_setup_component(0, "switch"), patch(
|
||||
"homeassistant.config.async_notify_setup_error"
|
||||
"homeassistant.setup.async_notify_setup_error"
|
||||
) as mock_notify:
|
||||
assert await setup.async_setup_component(
|
||||
hass,
|
||||
@ -389,7 +389,7 @@ async def test_platform_specific_config_validation(hass: HomeAssistant) -> None:
|
||||
hass.config.components.remove("switch")
|
||||
|
||||
with assert_setup_component(0), patch(
|
||||
"homeassistant.config.async_notify_setup_error"
|
||||
"homeassistant.setup.async_notify_setup_error"
|
||||
) as mock_notify:
|
||||
assert await setup.async_setup_component(
|
||||
hass,
|
||||
@ -410,7 +410,7 @@ async def test_platform_specific_config_validation(hass: HomeAssistant) -> None:
|
||||
hass.config.components.remove("switch")
|
||||
|
||||
with assert_setup_component(1, "switch"), patch(
|
||||
"homeassistant.config.async_notify_setup_error"
|
||||
"homeassistant.setup.async_notify_setup_error"
|
||||
) as mock_notify:
|
||||
assert await setup.async_setup_component(
|
||||
hass,
|
||||
|
Reference in New Issue
Block a user