##// END OF EJS Templates
fix more tests that fail if pandoc not installed
Paul Ivanov -
Show More
@@ -1,47 +1,50 b''
1 """
1 """
2 Module with tests for slides.py
2 Module with tests for slides.py
3 """
3 """
4
4
5 #-----------------------------------------------------------------------------
5 #-----------------------------------------------------------------------------
6 # Copyright (c) 2013, the IPython Development Team.
6 # Copyright (c) 2013, the IPython Development Team.
7 #
7 #
8 # Distributed under the terms of the Modified BSD License.
8 # Distributed under the terms of the Modified BSD License.
9 #
9 #
10 # The full license is in the file COPYING.txt, distributed with this software.
10 # The full license is in the file COPYING.txt, distributed with this software.
11 #-----------------------------------------------------------------------------
11 #-----------------------------------------------------------------------------
12
12
13 #-----------------------------------------------------------------------------
13 #-----------------------------------------------------------------------------
14 # Imports
14 # Imports
15 #-----------------------------------------------------------------------------
15 #-----------------------------------------------------------------------------
16
16
17 from .base import ExportersTestsBase
17 from .base import ExportersTestsBase
18 from ..slides import SlidesExporter
18 from ..slides import SlidesExporter
19 from IPython.testing.decorators import onlyif_cmds_exist
19
20
20 #-----------------------------------------------------------------------------
21 #-----------------------------------------------------------------------------
21 # Class
22 # Class
22 #-----------------------------------------------------------------------------
23 #-----------------------------------------------------------------------------
23
24
24 class TestSlidesExporter(ExportersTestsBase):
25 class TestSlidesExporter(ExportersTestsBase):
25 """Contains test functions for slides.py"""
26 """Contains test functions for slides.py"""
26
27
27 def test_constructor(self):
28 def test_constructor(self):
28 """
29 """
29 Can a SlidesExporter be constructed?
30 Can a SlidesExporter be constructed?
30 """
31 """
31 SlidesExporter()
32 SlidesExporter()
32
33
33
34
35 @onlyif_cmds_exist('pandoc')
34 def test_export(self):
36 def test_export(self):
35 """
37 """
36 Can a SlidesExporter export something?
38 Can a SlidesExporter export something?
37 """
39 """
38 (output, resources) = SlidesExporter().from_filename(self._get_notebook())
40 (output, resources) = SlidesExporter().from_filename(self._get_notebook())
39 assert len(output) > 0
41 assert len(output) > 0
40
42
41
43
44 @onlyif_cmds_exist('pandoc')
42 def test_export_reveal(self):
45 def test_export_reveal(self):
43 """
46 """
44 Can a SlidesExporter export using the 'reveal' template?
47 Can a SlidesExporter export using the 'reveal' template?
45 """
48 """
46 (output, resources) = SlidesExporter(template='reveal').from_filename(self._get_notebook())
49 (output, resources) = SlidesExporter(template='reveal').from_filename(self._get_notebook())
47 assert len(output) > 0
50 assert len(output) > 0
General Comments 0
You need to be logged in to leave comments. Login now