##// END OF EJS Templates
Merge pull request #6863 from minrk/markdown-tex-math...
Thomas Kluyver -
r18699:8de9a940 merge
parent child Browse files
Show More
@@ -4,6 +4,7 b''
4 # Copyright (c) IPython Development Team.
4 # Copyright (c) IPython Development Team.
5 # Distributed under the terms of the Modified BSD License.
5 # Distributed under the terms of the Modified BSD License.
6
6
7 import re
7 from copy import copy
8 from copy import copy
8
9
9 from IPython.utils.py3compat import string_types
10 from IPython.utils.py3compat import string_types
@@ -60,10 +61,18 b' class TestMarkdown(TestsBase):'
60 self.assertEqual(markdown2latex(s, markup='markdown_strict'), s)
61 self.assertEqual(markdown2latex(s, markup='markdown_strict'), s)
61 # This string should be passed through unaltered with pandoc's
62 # This string should be passed through unaltered with pandoc's
62 # markdown_strict+tex_math_dollars reader
63 # markdown_strict+tex_math_dollars reader
63 s = '$\\alpha$ latex math'
64 s = r'$\alpha$ latex math'
64 self.assertEqual(
65 # sometimes pandoc uses $math$, sometimes it uses \(math\)
66 expected = re.compile(r'(\$|\\\()\\alpha(\$|\\\)) latex math')
67 try:
68 # py3
69 assertRegex = self.assertRegex
70 except AttributeError:
71 # py2
72 assertRegex = self.assertRegexpMatches
73 assertRegex(
65 markdown2latex(s, markup='markdown_strict+tex_math_dollars'),
74 markdown2latex(s, markup='markdown_strict+tex_math_dollars'),
66 s)
75 expected)
67
76
68 @dec.onlyif_cmds_exist('pandoc')
77 @dec.onlyif_cmds_exist('pandoc')
69 def test_pandoc_extra_args(self):
78 def test_pandoc_extra_args(self):
General Comments 0
You need to be logged in to leave comments. Login now