result

test: {{ test.name }} {{ test.head }}

{{  test.body }}

input lines

{% for line in test.ilines %}{{ line }}
{% endfor %}
{% if result.kind.name == 'Pass' %}

pass

{% else %}

diff

{% for line in result.error.to_data()['data']['diff'] %} {% if line.startswith('-') %}
{{ line }}
{% elif line.startswith('+') %}
{{ line }}
{% else %}
{{ line }}
{% endif %} {% endfor %}
{% endif %}

actual

{% for line in result.actual %}{{ line }}
{% endfor %}
{{ result.to_data() | pprint }}