mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix tests are broken with pygments-2.1
This commit is contained in:
parent
34cbf3bad7
commit
5574aba60e
@ -82,7 +82,7 @@ HTML_XPATH = {
|
|||||||
(".//a[@href='_downloads/img1.png']", ''),
|
(".//a[@href='_downloads/img1.png']", ''),
|
||||||
(".//pre", u'"quotes"'),
|
(".//pre", u'"quotes"'),
|
||||||
(".//pre", u"'included'"),
|
(".//pre", u"'included'"),
|
||||||
(".//pre/span[@class='s']", u'üöä'),
|
(".//pre/span[@class='s2']", u'üöä'),
|
||||||
(".//div[@class='inc-pyobj1 highlight-text']//pre",
|
(".//div[@class='inc-pyobj1 highlight-text']//pre",
|
||||||
r'^class Foo:\n pass\n\s*$'),
|
r'^class Foo:\n pass\n\s*$'),
|
||||||
(".//div[@class='inc-pyobj2 highlight-text']//pre",
|
(".//div[@class='inc-pyobj2 highlight-text']//pre",
|
||||||
|
@ -694,14 +694,15 @@ def test_additional_targets_should_not_be_translated(app, status, warning):
|
|||||||
yield assert_count(expected_expr, result, 1)
|
yield assert_count(expected_expr, result, 1)
|
||||||
|
|
||||||
# C code block with lang should not be translated but be *C* highlighted
|
# C code block with lang should not be translated but be *C* highlighted
|
||||||
expected_expr = """<span class="cp">#include <stdio.h></span>"""
|
expected_expr = ("""<span class="cp">#include</span> """
|
||||||
|
"""<span class="cpf"><stdio.h></span>""")
|
||||||
yield assert_count(expected_expr, result, 1)
|
yield assert_count(expected_expr, result, 1)
|
||||||
|
|
||||||
# doctest block should not be translated but be highlighted
|
# doctest block should not be translated but be highlighted
|
||||||
expected_expr = (
|
expected_expr = (
|
||||||
"""<span class="gp">>>> </span>"""
|
"""<span class="gp">>>> </span>"""
|
||||||
"""<span class="kn">import</span> <span class="nn">sys</span> """
|
"""<span class="kn">import</span> <span class="nn">sys</span> """
|
||||||
"""<span class="c"># sys importing</span>""")
|
"""<span class="c1"># sys importing</span>""")
|
||||||
yield assert_count(expected_expr, result, 1)
|
yield assert_count(expected_expr, result, 1)
|
||||||
|
|
||||||
## raw.txt
|
## raw.txt
|
||||||
@ -754,14 +755,15 @@ def test_additional_targets_should_be_translated(app, status, warning):
|
|||||||
yield assert_count(expected_expr, result, 1)
|
yield assert_count(expected_expr, result, 1)
|
||||||
|
|
||||||
# C code block with lang should be translated and be *C* highlighted
|
# C code block with lang should be translated and be *C* highlighted
|
||||||
expected_expr = """<span class="cp">#include <STDIO.H></span>"""
|
expected_expr = ("""<span class="cp">#include</span> """
|
||||||
|
"""<span class="cpf"><STDIO.H></span>""")
|
||||||
yield assert_count(expected_expr, result, 1)
|
yield assert_count(expected_expr, result, 1)
|
||||||
|
|
||||||
# doctest block should not be translated but be highlighted
|
# doctest block should not be translated but be highlighted
|
||||||
expected_expr = (
|
expected_expr = (
|
||||||
"""<span class="gp">>>> </span>"""
|
"""<span class="gp">>>> </span>"""
|
||||||
"""<span class="kn">import</span> <span class="nn">sys</span> """
|
"""<span class="kn">import</span> <span class="nn">sys</span> """
|
||||||
"""<span class="c"># SYS IMPORTING</span>""")
|
"""<span class="c1"># SYS IMPORTING</span>""")
|
||||||
yield assert_count(expected_expr, result, 1)
|
yield assert_count(expected_expr, result, 1)
|
||||||
|
|
||||||
## raw.txt
|
## raw.txt
|
||||||
|
Loading…
Reference in New Issue
Block a user