mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Extract label template functions into a label Jinja2 extension (#156439)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -44,7 +44,13 @@ def assert_result_info(
|
||||
all_states: bool = False,
|
||||
) -> None:
|
||||
"""Check result info."""
|
||||
assert info.result() == result
|
||||
actual = info.result()
|
||||
assert actual == result, (
|
||||
f"Template result mismatch:\n"
|
||||
f" Expected: {result!r} (type: {type(result).__name__})\n"
|
||||
f" Actual: {actual!r} (type: {type(actual).__name__})\n"
|
||||
f" Template: {info.template!r}"
|
||||
)
|
||||
assert info.all_states == all_states
|
||||
assert info.filter("invalid_entity_name.somewhere") == all_states
|
||||
if entities is not None:
|
||||
|
||||
Reference in New Issue
Block a user