diff options
author | Kevin Brown <kevin@kevin-brown.com> | 2019-10-10 02:15:15 -0400 |
---|---|---|
committer | Kevin Brown <kevin@kevin-brown.com> | 2019-10-10 02:32:29 -0400 |
commit | ca72c5f301d1aa2ce0e75b440dc6364b4a69bbeb (patch) | |
tree | 5286cd51e11f0b1b343453c043618781514f44de /tests/test_inheritance.py | |
parent | 0b9d252a071b0b5a171e1308157da74aa079b9d8 (diff) | |
download | jinja2-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.py | 4 |
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) |