Show More
@@ -4,6 +4,7 b'' | |||
|
4 | 4 | # Copyright (c) IPython Development Team. |
|
5 | 5 | # Distributed under the terms of the Modified BSD License. |
|
6 | 6 | |
|
7 | import re | |
|
7 | 8 | from copy import copy |
|
8 | 9 | |
|
9 | 10 | from IPython.utils.py3compat import string_types |
@@ -60,10 +61,18 b' class TestMarkdown(TestsBase):' | |||
|
60 | 61 | self.assertEqual(markdown2latex(s, markup='markdown_strict'), s) |
|
61 | 62 | # This string should be passed through unaltered with pandoc's |
|
62 | 63 | # markdown_strict+tex_math_dollars reader |
|
63 |
s = '$\ |
|
|
64 | self.assertEqual( | |
|
64 | s = r'$\alpha$ latex math' | |
|
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 | 74 | markdown2latex(s, markup='markdown_strict+tex_math_dollars'), |
|
66 |
|
|
|
75 | expected) | |
|
67 | 76 | |
|
68 | 77 | @dec.onlyif_cmds_exist('pandoc') |
|
69 | 78 | def test_pandoc_extra_args(self): |
General Comments 0
You need to be logged in to leave comments.
Login now