Show More
@@ -1,7 +1,7 b'' | |||||
1 | """Test Pandoc module""" |
|
1 | """Test Pandoc module""" | |
2 |
|
2 | |||
3 | #----------------------------------------------------------------------------- |
|
3 | #----------------------------------------------------------------------------- | |
4 |
# Copyright (C) 201 |
|
4 | # Copyright (C) 2014 The IPython Development Team | |
5 | # |
|
5 | # | |
6 | # Distributed under the terms of the BSD License. The full license is in |
|
6 | # Distributed under the terms of the BSD License. The full license is in | |
7 | # the file COPYING, distributed as part of this software. |
|
7 | # the file COPYING, distributed as part of this software. | |
@@ -10,24 +10,16 b'' | |||||
10 | #----------------------------------------------------------------------------- |
|
10 | #----------------------------------------------------------------------------- | |
11 | # Imports |
|
11 | # Imports | |
12 | #----------------------------------------------------------------------------- |
|
12 | #----------------------------------------------------------------------------- | |
13 |
|
||||
14 | import os |
|
13 | import os | |
15 |
|
14 | |||
16 | from .base import TestsBase |
|
|||
17 | from ..utils import pandoc |
|
|||
18 |
|
||||
19 | from IPython.testing import decorators as dec |
|
15 | from IPython.testing import decorators as dec | |
20 |
|
16 | |||
21 | #----------------------------------------------------------------------------- |
|
17 | from .base import TestsBase | |
22 | # Constants |
|
18 | from ..utils import pandoc | |
23 | #----------------------------------------------------------------------------- |
|
|||
24 |
|
||||
25 |
|
19 | |||
26 | #----------------------------------------------------------------------------- |
|
20 | #----------------------------------------------------------------------------- | |
27 | # Classes and functions |
|
21 | # Classes and functions | |
28 | #----------------------------------------------------------------------------- |
|
22 | #----------------------------------------------------------------------------- | |
29 |
|
||||
30 |
|
||||
31 | class TestPandoc(TestsBase): |
|
23 | class TestPandoc(TestsBase): | |
32 | """Collection of Pandoc tests""" |
|
24 | """Collection of Pandoc tests""" | |
33 |
|
25 | |||
@@ -50,9 +42,8 b' class TestPandoc(TestsBase):' | |||||
50 | assert pandoc_function_raised_missing(pandoc.get_pandoc_version) == False |
|
42 | assert pandoc_function_raised_missing(pandoc.get_pandoc_version) == False | |
51 | assert pandoc_function_raised_missing(pandoc.check_pandoc_version) == False |
|
43 | assert pandoc_function_raised_missing(pandoc.check_pandoc_version) == False | |
52 | assert pandoc_function_raised_missing(pandoc.pandoc, "", "markdown", "html") == False |
|
44 | assert pandoc_function_raised_missing(pandoc.pandoc, "", "markdown", "html") == False | |
53 |
|
||||
54 |
|
45 | |||
55 |
@dec.onlyif_cmds_exist('pandoc') |
|
46 | @dec.onlyif_cmds_exist('pandoc') | |
56 | def test_minimal_version(self): |
|
47 | def test_minimal_version(self): | |
57 | original_minversion = pandoc._minimal_version |
|
48 | original_minversion = pandoc._minimal_version | |
58 |
|
49 | |||
@@ -61,9 +52,7 b' class TestPandoc(TestsBase):' | |||||
61 |
|
52 | |||
62 | pandoc._minimal_version = pandoc.get_pandoc_version() |
|
53 | pandoc._minimal_version = pandoc.get_pandoc_version() | |
63 | assert pandoc.check_pandoc_version() |
|
54 | assert pandoc.check_pandoc_version() | |
64 |
|
||||
65 |
|
55 | |||
66 |
|
||||
67 |
|
56 | |||
68 | def pandoc_function_raised_missing(f, *args, **kwargs): |
|
57 | def pandoc_function_raised_missing(f, *args, **kwargs): | |
69 | try: |
|
58 | try: |
General Comments 0
You need to be logged in to leave comments.
Login now