summaryrefslogtreecommitdiff
path: root/tests/test_inheritance.py
diff options
context:
space:
mode:
authorKevin Brown <kevin@kevin-brown.com>2019-10-10 02:15:15 -0400
committerKevin Brown <kevin@kevin-brown.com>2019-10-10 02:32:29 -0400
commitca72c5f301d1aa2ce0e75b440dc6364b4a69bbeb (patch)
tree5286cd51e11f0b1b343453c043618781514f44de /tests/test_inheritance.py
parent0b9d252a071b0b5a171e1308157da74aa079b9d8 (diff)
downloadjinja2-pytest-cleanup.tar.gz
Replaced try...catch within tests with pytest.raisespytest-cleanup
This still leaves one in test_debug which relies on reading out the traceback and cannot easily be replaced by pytest.raises like the others.
Diffstat (limited to 'tests/test_inheritance.py')
-rw-r--r--tests/test_inheritance.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/test_inheritance.py b/tests/test_inheritance.py
index 7746c2d..e753506 100644
--- a/tests/test_inheritance.py
+++ b/tests/test_inheritance.py
@@ -242,7 +242,5 @@ class TestBugFix(object):
"""Ensures that a template with more than 1 {% extends ... %} usage
raises a ``TemplateError``.
"""
- try:
+ with pytest.raises(TemplateError):
tmpl = env.get_template('doublee')
- except Exception as e:
- assert isinstance(e, TemplateError)