From 6220df57d1c5f682b3eff4db41749d82d9639904 Mon Sep 17 00:00:00 2001 From: Benjamin Auquite Date: Mon, 10 Apr 2023 05:59:26 -0500 Subject: [PATCH] fix the test --- tests/test_switch.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_switch.py b/tests/test_switch.py index 325084d2..12780322 100644 --- a/tests/test_switch.py +++ b/tests/test_switch.py @@ -915,7 +915,7 @@ async def test_state_change_handlers(hass): # [Config options]: transition_used = 2 - total_events = 5 + total_events = 6 async def set_brightness(val: int): # 'Unsafe' set but we know what we're doing. @@ -1090,9 +1090,10 @@ async def test_state_change_handlers(hass): assert switch._alt_detect_method assert listener.last_state_change.get(ENTITY_LIGHT) + if i == 1: + total_events = 2 assert len(listener.last_state_change[ENTITY_LIGHT]) == total_events # Timer should be done and reset now. - # This is the assert that I can't fix. timer = listener.transition_timers.get(ENTITY_LIGHT) assert not timer or not timer.is_running()