##// END OF EJS Templates
on("destroy",...) -> once("destroy",...) so we don't keep a reference to it, preventing gc...
on("destroy",...) -> once("destroy",...) so we don't keep a reference to it, preventing gc Thanks to Sylvain Corlay for the suggestion.

File last commit:

r16847:973a2f6d
r18058:c7253b21
Show More
test_notebook.py
22 lines | 697 B | text/x-python | PythonLexer
"""Tests for notebook.py"""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
from .base import ExportersTestsBase
from ..notebook import NotebookExporter
class TestNotebookExporter(ExportersTestsBase):
"""Contains test functions for notebook.py"""
exporter_class = NotebookExporter
def test_export(self):
"""
Does the NotebookExporter return the file unchanged?
"""
with open(self._get_notebook()) as f:
file_contents = f.read()
(output, resources) = NotebookExporter().from_filename(self._get_notebook())
assert len(output) > 0
assert output == file_contents