Skip to content
Myr

fix invalid double extends test

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by David Lord · committed by David Lord · parent ca72c5f · Browse files · 1 file+3 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−3 removed

  • tests:+3 added−3 removed

1 file+3 added−3 removed

modified:tests/test_inheritance.py+3 added-3 removed
9 unmodified lines
10"""11import pytest1213from jinja2 import Environment, DictLoader, TemplateError14from jinja2 import TemplateRuntimeError151516LAYOUTTEMPLATE = '''\17|{% block block1 %}block 1 from layout{% endblock %}18|{% block block2 %}block 2 from layout{% endblock %}19|{% block block3 %}
221 unmodified lines
241 def test_double_extends(self, env):242 """Ensures that a template with more than 1 {% extends ... %} usage243 raises a ``TemplateError``.244 """245 with pytest.raises(TemplateError):246 tmpl = env.get_template('doublee')245 with pytest.raises(TemplateRuntimeError, match="extended multiple times"):246 env.get_template('doublee').render()