From 7384140a60ade1393cf3c4ad8454477641aba681 Mon Sep 17 00:00:00 2001
From: epenet <6771947+epenet@users.noreply.github.com>
Date: Tue, 11 Jun 2024 17:20:23 +0200
Subject: [PATCH] Fix pointless-exception-statement warning in tests (#119402)

---
 tests/common.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/common.py b/tests/common.py
index cf5469e1cd2..1e53242c961 100644
--- a/tests/common.py
+++ b/tests/common.py
@@ -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)
 
-- 
GitLab