Fix pointless-exception-statement warning in tests (#119402)

pull/115557/head
epenet 2024-06-11 17:20:23 +02:00 committed by GitHub
parent 5531e54745
commit 7384140a60
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -600,7 +600,7 @@ def mock_state_change_event(
def mock_component(hass: HomeAssistant, component: str) -> None:
"""Mock a component is setup."""
if component in hass.config.components:
AssertionError(f"Integration {component} is already setup")
raise AssertionError(f"Integration {component} is already setup")
hass.config.components.add(component)