mirror of
https://github.com/home-assistant/core.git
synced 2025-07-08 22:07:10 +00:00
Fix command_line tests RuntimeWarnings (#97731)
This commit is contained in:
parent
99145d46d2
commit
e905ac173f
@ -246,7 +246,7 @@ async def test_updating_to_often(
|
|||||||
assert called
|
assert called
|
||||||
async_fire_time_changed(hass, dt_util.now() + timedelta(seconds=15))
|
async_fire_time_changed(hass, dt_util.now() + timedelta(seconds=15))
|
||||||
wait_till_event.set()
|
wait_till_event.set()
|
||||||
asyncio.wait(0)
|
await asyncio.sleep(0)
|
||||||
assert (
|
assert (
|
||||||
"Updating Command Line Binary Sensor Test took longer than the scheduled update interval"
|
"Updating Command Line Binary Sensor Test took longer than the scheduled update interval"
|
||||||
not in caplog.text
|
not in caplog.text
|
||||||
@ -258,6 +258,7 @@ async def test_updating_to_often(
|
|||||||
await asyncio.sleep(0)
|
await asyncio.sleep(0)
|
||||||
async_fire_time_changed(hass, dt_util.now() + timedelta(seconds=10))
|
async_fire_time_changed(hass, dt_util.now() + timedelta(seconds=10))
|
||||||
wait_till_event.set()
|
wait_till_event.set()
|
||||||
|
await asyncio.sleep(0)
|
||||||
|
|
||||||
assert (
|
assert (
|
||||||
"Updating Command Line Binary Sensor Test took longer than the scheduled update interval"
|
"Updating Command Line Binary Sensor Test took longer than the scheduled update interval"
|
||||||
|
@ -580,7 +580,7 @@ async def test_updating_to_often(
|
|||||||
assert called
|
assert called
|
||||||
async_fire_time_changed(hass, dt_util.now() + timedelta(seconds=15))
|
async_fire_time_changed(hass, dt_util.now() + timedelta(seconds=15))
|
||||||
wait_till_event.set()
|
wait_till_event.set()
|
||||||
asyncio.wait(0)
|
await asyncio.sleep(0)
|
||||||
|
|
||||||
assert (
|
assert (
|
||||||
"Updating Command Line Sensor Test took longer than the scheduled update interval"
|
"Updating Command Line Sensor Test took longer than the scheduled update interval"
|
||||||
@ -593,6 +593,7 @@ async def test_updating_to_often(
|
|||||||
await asyncio.sleep(0)
|
await asyncio.sleep(0)
|
||||||
async_fire_time_changed(hass, dt_util.now() + timedelta(seconds=10))
|
async_fire_time_changed(hass, dt_util.now() + timedelta(seconds=10))
|
||||||
wait_till_event.set()
|
wait_till_event.set()
|
||||||
|
await asyncio.sleep(0)
|
||||||
|
|
||||||
assert (
|
assert (
|
||||||
"Updating Command Line Sensor Test took longer than the scheduled update interval"
|
"Updating Command Line Sensor Test took longer than the scheduled update interval"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user