Show More
@@ -1,40 +1,64 b'' | |||||
1 | """ |
|
1 | """ | |
2 | Module with tests for basichtml.py |
|
2 | Module with tests for basichtml.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 ..basichtml import BasicHTMLExporter |
|
18 | from ..basichtml import BasicHTMLExporter | |
19 | from IPython.testing.decorators import onlyif_cmds_exist |
|
19 | from IPython.testing.decorators import onlyif_cmds_exist | |
20 |
|
20 | |||
21 | #----------------------------------------------------------------------------- |
|
21 | #----------------------------------------------------------------------------- | |
22 | # Class |
|
22 | # Class | |
23 | #----------------------------------------------------------------------------- |
|
23 | #----------------------------------------------------------------------------- | |
24 |
|
24 | |||
25 | class TestBasicHTMLExporter(ExportersTestsBase): |
|
25 | class TestBasicHTMLExporter(ExportersTestsBase): | |
26 | """Contains test functions for basichtml.py""" |
|
26 | """Contains test functions for basichtml.py""" | |
27 |
|
27 | |||
28 | def test_constructor(self): |
|
28 | def test_constructor(self): | |
29 | """ |
|
29 | """ | |
30 | Can a BasicHTMLExporter be constructed? |
|
30 | Can a BasicHTMLExporter be constructed? | |
31 | """ |
|
31 | """ | |
32 | BasicHTMLExporter() |
|
32 | BasicHTMLExporter() | |
33 |
|
33 | |||
34 | @onlyif_cmds_exist('pandoc') |
|
34 | @onlyif_cmds_exist('pandoc') | |
35 | def test_export(self): |
|
35 | def test_export(self): | |
36 | """ |
|
36 | """ | |
37 | Can a BasicHTMLExporter export something? |
|
37 | Can a BasicHTMLExporter export something? | |
38 | """ |
|
38 | """ | |
39 | (output, resources) = BasicHTMLExporter().from_filename(self._get_notebook()) |
|
39 | (output, resources) = BasicHTMLExporter().from_filename(self._get_notebook()) | |
40 | assert len(output) > 0 |
|
40 | assert len(output) > 0 | |
|
41 | ||||
|
42 | ||||
|
43 | def test_export_basic(self): | |||
|
44 | """ | |||
|
45 | Can a BasicHTMLExporter export using the 'basic' flavor? | |||
|
46 | """ | |||
|
47 | (output, resources) = BasicHTMLExporter(flavor='basic').from_filename(self._get_notebook()) | |||
|
48 | assert len(output) > 0 | |||
|
49 | ||||
|
50 | ||||
|
51 | def test_export_full(self): | |||
|
52 | """ | |||
|
53 | Can a BasicHTMLExporter export using the 'full' flavor? | |||
|
54 | """ | |||
|
55 | (output, resources) = BasicHTMLExporter(flavor='full').from_filename(self._get_notebook()) | |||
|
56 | assert len(output) > 0 | |||
|
57 | ||||
|
58 | ||||
|
59 | def test_export_reveal(self): | |||
|
60 | """ | |||
|
61 | Can a BasicHTMLExporter export using the 'reveal' flavor? | |||
|
62 | """ | |||
|
63 | (output, resources) = BasicHTMLExporter(flavor='reveal').from_filename(self._get_notebook()) | |||
|
64 | assert len(output) > 0 No newline at end of file |
@@ -1,41 +1,65 b'' | |||||
1 | """ |
|
1 | """ | |
2 | Module with tests for latex.py |
|
2 | Module with tests for latex.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 ..latex import LatexExporter |
|
18 | from ..latex import LatexExporter | |
19 | from IPython.testing.decorators import onlyif_cmds_exist |
|
19 | from IPython.testing.decorators import onlyif_cmds_exist | |
20 |
|
20 | |||
21 | #----------------------------------------------------------------------------- |
|
21 | #----------------------------------------------------------------------------- | |
22 | # Class |
|
22 | # Class | |
23 | #----------------------------------------------------------------------------- |
|
23 | #----------------------------------------------------------------------------- | |
24 |
|
24 | |||
25 | class TestLatexExporter(ExportersTestsBase): |
|
25 | class TestLatexExporter(ExportersTestsBase): | |
26 | """Contains test functions for latex.py""" |
|
26 | """Contains test functions for latex.py""" | |
27 |
|
27 | |||
28 | def test_constructor(self): |
|
28 | def test_constructor(self): | |
29 | """ |
|
29 | """ | |
30 | Can a LatexExporter be constructed? |
|
30 | Can a LatexExporter be constructed? | |
31 | """ |
|
31 | """ | |
32 | LatexExporter() |
|
32 | LatexExporter() | |
33 |
|
33 | |||
34 |
|
34 | |||
35 | @onlyif_cmds_exist('pandoc') |
|
35 | @onlyif_cmds_exist('pandoc') | |
36 | def test_export(self): |
|
36 | def test_export(self): | |
37 | """ |
|
37 | """ | |
38 | Can a LatexExporter export something? |
|
38 | Can a LatexExporter export something? | |
39 | """ |
|
39 | """ | |
40 | (output, resources) = LatexExporter().from_filename(self._get_notebook()) |
|
40 | (output, resources) = LatexExporter().from_filename(self._get_notebook()) | |
41 | assert len(output) > 0 |
|
41 | assert len(output) > 0 | |
|
42 | ||||
|
43 | ||||
|
44 | def test_export_full(self): | |||
|
45 | """ | |||
|
46 | Can a LatexExporter export using 'full' flavor? | |||
|
47 | """ | |||
|
48 | (output, resources) = LatexExporter(flavor='full').from_filename(self._get_notebook()) | |||
|
49 | assert len(output) > 0 | |||
|
50 | ||||
|
51 | ||||
|
52 | def test_export_basic(self): | |||
|
53 | """ | |||
|
54 | Can a LatexExporter export using 'basic' flavor? | |||
|
55 | """ | |||
|
56 | (output, resources) = LatexExporter(flavor='basic').from_filename(self._get_notebook()) | |||
|
57 | assert len(output) > 0 | |||
|
58 | ||||
|
59 | ||||
|
60 | def test_export_reveal(self): | |||
|
61 | """ | |||
|
62 | Can a LatexExporter export using 'reveal' flavor? | |||
|
63 | """ | |||
|
64 | (output, resources) = LatexExporter(flavor='reveal').from_filename(self._get_notebook()) | |||
|
65 | assert len(output) > 0 No newline at end of file |
1 | NO CONTENT: file renamed from IPython/nbconvert/templates/html_slides.tpl to IPython/nbconvert/templates/html_reveal.tpl |
|
NO CONTENT: file renamed from IPython/nbconvert/templates/html_slides.tpl to IPython/nbconvert/templates/html_reveal.tpl |
General Comments 0
You need to be logged in to leave comments.
Login now