From 9ca80538d9e9418ae658772516f9b7dfb1e02ccd Mon Sep 17 00:00:00 2001 From: David Lord Date: Thu, 10 Oct 2019 06:57:04 -0700 Subject: [PATCH] fix invalid double extends test --- tests/test_inheritance.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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() -- 2.47.2