Skip to content

Commit

Permalink
Use pytest.raises not pytest.mark.xfail
Browse files Browse the repository at this point in the history
  • Loading branch information
mpacer committed Jan 8, 2017
1 parent 74f389b commit f557220
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nbconvert/exporters/tests/test_templateexporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)



Expand Down

0 comments on commit f557220

Please sign in to comment.