##// END OF EJS Templates
Adds configuration options to use Google Drive content manager...
Adds configuration options to use Google Drive content manager Adds the key contentmanager_js_source to webapp_settings that allows for specifying the content manager JavaScript source file. Also adds a NotebookManager subclass, ClientSideNotebookManager, which does minimal logic. This class is used when the JavaScript content manager doesn't use the Python notebook manager, but rather implements that logic client side, as is the case for the Google Drive based content manager. A sample command line that uses the Google Drive content manager, and the ClientSideNotebookManager, is ipython notebook --NotebookApp.webapp_settings="{'contentmanager_js_source': 'base/js/drive_contentmanager'}" --NotebookApp.notebook_manager_class="IPython.html.services.notebooks.clientsidenbmanager.ClientSideNotebookManager"

File last commit:

r15439:37fe6ef6
r18639:28c27a69
Show More
test_slides.py
51 lines | 1.7 KiB | text/x-python | PythonLexer
MinRK
test raw cell inclusion based on raw_format metadata
r13665 """Tests for SlidesExporter"""
Jonathan Frederic
HTML-Slides -> Slides-Reveal
r11744
#-----------------------------------------------------------------------------
# Copyright (c) 2013, the IPython Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
# Imports
#-----------------------------------------------------------------------------
from .base import ExportersTestsBase
from ..slides import SlidesExporter
MinRK
run html nbconvert tests if node or pandoc is available
r15439 from IPython.testing.decorators import onlyif_any_cmd_exists
Jonathan Frederic
HTML-Slides -> Slides-Reveal
r11744
#-----------------------------------------------------------------------------
# Class
#-----------------------------------------------------------------------------
class TestSlidesExporter(ExportersTestsBase):
MinRK
test raw cell inclusion based on raw_format metadata
r13665 """Tests for SlidesExporter"""
exporter_class = SlidesExporter
should_include_raw = ['html']
Jonathan Frederic
HTML-Slides -> Slides-Reveal
r11744
def test_constructor(self):
"""
Can a SlidesExporter be constructed?
"""
SlidesExporter()
MinRK
run html nbconvert tests if node or pandoc is available
r15439 @onlyif_any_cmd_exists('nodejs', 'node', 'pandoc')
Jonathan Frederic
HTML-Slides -> Slides-Reveal
r11744 def test_export(self):
"""
Can a SlidesExporter export something?
"""
(output, resources) = SlidesExporter().from_filename(self._get_notebook())
assert len(output) > 0
MinRK
run html nbconvert tests if node or pandoc is available
r15439 @onlyif_any_cmd_exists('nodejs', 'node', 'pandoc')
Jonathan Frederic
HTML-Slides -> Slides-Reveal
r11744 def test_export_reveal(self):
"""
Jonathan Frederic
flavor=template
r11745 Can a SlidesExporter export using the 'reveal' template?
Jonathan Frederic
HTML-Slides -> Slides-Reveal
r11744 """
Thomas Kluyver
Fix tests to use full template names
r13926 (output, resources) = SlidesExporter(template_file='slides_reveal').from_filename(self._get_notebook())
Jonathan Frederic
HTML-Slides -> Slides-Reveal
r11744 assert len(output) > 0