Skip to content

Commit

Permalink
Add assertion that template does not exist with specific extension, s…
Browse files Browse the repository at this point in the history
…o error output will be useful. Change file name
  • Loading branch information
mpacer committed Jan 3, 2017
1 parent 5874719 commit 68abd56
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions nbconvert/exporters/tests/test_templateexporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,14 @@ class MyExporter(TemplateExporter):


@pytest.mark.xfail(strict=True, raises=TemplateNotFound)
def test_in_memory_template_failure_to_find(self):

# Create exporter with invalid template file, try to convert empty notebook
# failure is expected due to nonexistant template file.
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
# expected due to nonexistant template file.

template = 'does_not_exist.tpl'
exporter = TemplateExporter(template_file=template)
assert template not in exporter.environment.loader.list_templates()
assert template not in exporter.environment.list_templates(extensions=['tpl'])
nb = v4.new_notebook()
out, resources = exporter.from_notebook_node(nb)

Expand Down

0 comments on commit 68abd56

Please sign in to comment.