From: David Lord Date: Thu, 10 Oct 2019 13:57:04 +0000 (-0700) Subject: fix invalid double extends test X-Git-Tag: 2.11.0~46^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1077%2Fhead;p=thirdparty%2Fjinja.git fix invalid double extends test --- diff --git a/tests/test_inheritance.py b/tests/test_inheritance.py index e753506a..f3121643 100644 --- a/tests/test_inheritance.py +++ b/tests/test_inheritance.py @@ -11,7 +11,7 @@ import pytest from jinja2 import Environment, DictLoader, TemplateError - +from jinja2 import TemplateRuntimeError LAYOUTTEMPLATE = '''\ |{% block block1 %}block 1 from layout{% endblock %} @@ -242,5 +242,5 @@ class TestBugFix(object): """Ensures that a template with more than 1 {% extends ... %} usage raises a ``TemplateError``. """ - with pytest.raises(TemplateError): - tmpl = env.get_template('doublee') + with pytest.raises(TemplateRuntimeError, match="extended multiple times"): + env.get_template('doublee').render()