]> git.ipfire.org Git - thirdparty/jinja.git/commitdiff
fix invalid double extends test 1077/head
authorDavid Lord <davidism@gmail.com>
Thu, 10 Oct 2019 13:57:04 +0000 (06:57 -0700)
committerDavid Lord <davidism@gmail.com>
Thu, 10 Oct 2019 13:57:04 +0000 (06:57 -0700)
tests/test_inheritance.py

index e753506a36e88b4a8f13da8ba7f9c1f7e726d14f..f31216430bdb0d409081395235e78d07ae0ac777 100644 (file)
@@ -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()