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