@@ -89,7 +89,7 @@ async def test_parse_date_time(hass, caplog):
89
89
):
90
90
for test_data in parseDateTimeTests :
91
91
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 )
93
93
assert out == expect
94
94
await Function .waiter_sync ()
95
95
await Function .waiter_stop ()
@@ -128,7 +128,7 @@ async def test_parse_date_time_day_names(hass, caplog):
128
128
):
129
129
for test_data in parseDateTimeTestsDayNames :
130
130
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 )
132
132
assert out == expect
133
133
await Function .waiter_sync ()
134
134
await Function .waiter_stop ()
@@ -211,7 +211,7 @@ async def test_timer_active_check(hass, spec, now, expected):
211
211
Function .init (hass )
212
212
TrigTime .init (hass )
213
213
# 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 )
215
215
assert out == expected
216
216
await Function .waiter_sync ()
217
217
await Function .waiter_stop ()
@@ -479,7 +479,7 @@ async def test_timer_trigger_next(hass):
479
479
startup_time = now = dt (2019 , 9 , 1 , 13 , 0 , 0 , 100000 )
480
480
spec , expect_seq = test_data
481
481
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 )
483
483
assert t_next == expect
484
484
if t_next is None :
485
485
break
@@ -595,7 +595,7 @@ async def test_timer_trigger_next_month_rollover(hass):
595
595
startup_time = now = dt (2020 , 6 , 30 , 13 , 0 , 0 , 100000 )
596
596
spec , expect_seq = test_data
597
597
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 )
599
599
assert t_next == expect
600
600
if t_next is None :
601
601
break
@@ -665,7 +665,7 @@ async def test_timer_trigger_dst_next(hass):
665
665
startup_time = now = dt (2019 , 11 , 3 , 0 , 0 , 0 , 0 )
666
666
spec , expect_seq = test_data
667
667
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 )
669
669
delta = (t_next_adj - now ).total_seconds ()
670
670
# print(f"calling timer_trigger_next({spec}, {dt_util.as_local(now)}, {startup_time}) -> {dt_util.as_local(t_next)} (delta = {delta})")
671
671
if isinstance (expect , list ):
0 commit comments