1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Don't log template errors from developer tool (#48933)

This commit is contained in:
Erik Montnemery
2021-04-09 21:10:02 +02:00
committed by GitHub
parent 43335953a2
commit 16196e2e16
5 changed files with 89 additions and 21 deletions

View File

@@ -2267,9 +2267,6 @@ async def test_template_timeout(hass):
tmp = template.Template("{{ states | count }}", hass)
assert await tmp.async_render_will_timeout(3) is False
tmp2 = template.Template("{{ error_invalid + 1 }}", hass)
assert await tmp2.async_render_will_timeout(3) is False
tmp3 = template.Template("static", hass)
assert await tmp3.async_render_will_timeout(3) is False
@@ -2287,6 +2284,13 @@ async def test_template_timeout(hass):
assert await tmp5.async_render_will_timeout(0.000001) is True
async def test_template_timeout_raise(hass):
"""Test we can raise from."""
tmp2 = template.Template("{{ error_invalid + 1 }}", hass)
with pytest.raises(TemplateError):
assert await tmp2.async_render_will_timeout(3) is False
async def test_lights(hass):
"""Test we can sort lights."""