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