@@ -89,7 +89,7 @@ async def test_parse_date_time(hass, caplog):
8989 ):
9090 for test_data in parseDateTimeTests :
9191 spec , date_offset , expect = test_data
92- out = TrigTime .parse_date_time (spec , date_offset , now , now )
92+ out = await TrigTime .parse_date_time (spec , date_offset , now , now )
9393 assert out == expect
9494 await Function .waiter_sync ()
9595 await Function .waiter_stop ()
@@ -128,7 +128,7 @@ async def test_parse_date_time_day_names(hass, caplog):
128128 ):
129129 for test_data in parseDateTimeTestsDayNames :
130130 spec , date_offset , expect = test_data
131- out = TrigTime .parse_date_time (spec , date_offset , now , now )
131+ out = await TrigTime .parse_date_time (spec , date_offset , now , now )
132132 assert out == expect
133133 await Function .waiter_sync ()
134134 await Function .waiter_stop ()
@@ -211,7 +211,7 @@ async def test_timer_active_check(hass, spec, now, expected):
211211 Function .init (hass )
212212 TrigTime .init (hass )
213213 # print(f"calling timer_active_check({spec}, {now}, {startup_time})")
214- out = TrigTime .timer_active_check (spec , now , startup_time )
214+ out = await TrigTime .timer_active_check (spec , now , startup_time )
215215 assert out == expected
216216 await Function .waiter_sync ()
217217 await Function .waiter_stop ()
@@ -479,7 +479,7 @@ async def test_timer_trigger_next(hass):
479479 startup_time = now = dt (2019 , 9 , 1 , 13 , 0 , 0 , 100000 )
480480 spec , expect_seq = test_data
481481 for expect in expect_seq :
482- t_next , _ = TrigTime .timer_trigger_next (spec , now , startup_time )
482+ t_next , _ = await TrigTime .timer_trigger_next (spec , now , startup_time )
483483 assert t_next == expect
484484 if t_next is None :
485485 break
@@ -595,7 +595,7 @@ async def test_timer_trigger_next_month_rollover(hass):
595595 startup_time = now = dt (2020 , 6 , 30 , 13 , 0 , 0 , 100000 )
596596 spec , expect_seq = test_data
597597 for expect in expect_seq :
598- t_next , _ = TrigTime .timer_trigger_next (spec , now , startup_time )
598+ t_next , _ = await TrigTime .timer_trigger_next (spec , now , startup_time )
599599 assert t_next == expect
600600 if t_next is None :
601601 break
@@ -665,7 +665,7 @@ async def test_timer_trigger_dst_next(hass):
665665 startup_time = now = dt (2019 , 11 , 3 , 0 , 0 , 0 , 0 )
666666 spec , expect_seq = test_data
667667 for expect in expect_seq :
668- t_next , t_next_adj = TrigTime .timer_trigger_next (spec , now , startup_time )
668+ t_next , t_next_adj = await TrigTime .timer_trigger_next (spec , now , startup_time )
669669 delta = (t_next_adj - now ).total_seconds ()
670670 # print(f"calling timer_trigger_next({spec}, {dt_util.as_local(now)}, {startup_time}) -> {dt_util.as_local(t_next)} (delta = {delta})")
671671 if isinstance (expect , list ):
0 commit comments