From f557220add9907db2f672ccbf0ebfe91da50f7c5 Mon Sep 17 00:00:00 2001 From: michaelpacer Date: Sat, 7 Jan 2017 18:48:05 -0800 Subject: [PATCH] Use pytest.raises not pytest.mark.xfail --- nbconvert/exporters/tests/test_templateexporter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nbconvert/exporters/tests/test_templateexporter.py b/nbconvert/exporters/tests/test_templateexporter.py index e6a6dc5dd..5ac5a828c 100644 --- a/nbconvert/exporters/tests/test_templateexporter.py +++ b/nbconvert/exporters/tests/test_templateexporter.py @@ -132,7 +132,6 @@ class MyExporter(TemplateExporter): out, resources = exporter.from_notebook_node(nb) - @pytest.mark.xfail(strict=True, raises=TemplateNotFound) def test_fail_to_find_template_file(self): # Create exporter with invalid template file, check that it doesn't # exist in the environment, try to convert empty notebook. Failure is @@ -142,7 +141,8 @@ def test_fail_to_find_template_file(self): exporter = TemplateExporter(template_file=template) assert template not in exporter.environment.list_templates(extensions=['tpl']) nb = v4.new_notebook() - out, resources = exporter.from_notebook_node(nb) + with pytest.raises(TemplateNotFound): + out, resources = exporter.from_notebook_node(nb)