Skip to content

Commit 5574aba

Browse files
committed
Fix tests are broken with pygments-2.1
1 parent 34cbf3b commit 5574aba

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

tests/test_build_html.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def checker(nodes):
8282
(".//a[@href='_downloads/img1.png']", ''),
8383
(".//pre", u'"quotes"'),
8484
(".//pre", u"'included'"),
85-
(".//pre/span[@class='s']", u'üöä'),
85+
(".//pre/span[@class='s2']", u'üöä'),
8686
(".//div[@class='inc-pyobj1 highlight-text']//pre",
8787
r'^class Foo:\n pass\n\s*$'),
8888
(".//div[@class='inc-pyobj2 highlight-text']//pre",

tests/test_intl.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -694,14 +694,15 @@ def test_additional_targets_should_not_be_translated(app, status, warning):
694694
yield assert_count(expected_expr, result, 1)
695695

696696
# C code block with lang should not be translated but be *C* highlighted
697-
expected_expr = """<span class="cp">#include &lt;stdio.h&gt;</span>"""
697+
expected_expr = ("""<span class="cp">#include</span> """
698+
"""<span class="cpf">&lt;stdio.h&gt;</span>""")
698699
yield assert_count(expected_expr, result, 1)
699700

700701
# doctest block should not be translated but be highlighted
701702
expected_expr = (
702703
"""<span class="gp">&gt;&gt;&gt; </span>"""
703704
"""<span class="kn">import</span> <span class="nn">sys</span> """
704-
"""<span class="c"># sys importing</span>""")
705+
"""<span class="c1"># sys importing</span>""")
705706
yield assert_count(expected_expr, result, 1)
706707

707708
## raw.txt
@@ -754,14 +755,15 @@ def test_additional_targets_should_be_translated(app, status, warning):
754755
yield assert_count(expected_expr, result, 1)
755756

756757
# C code block with lang should be translated and be *C* highlighted
757-
expected_expr = """<span class="cp">#include &lt;STDIO.H&gt;</span>"""
758+
expected_expr = ("""<span class="cp">#include</span> """
759+
"""<span class="cpf">&lt;STDIO.H&gt;</span>""")
758760
yield assert_count(expected_expr, result, 1)
759761

760762
# doctest block should not be translated but be highlighted
761763
expected_expr = (
762764
"""<span class="gp">&gt;&gt;&gt; </span>"""
763765
"""<span class="kn">import</span> <span class="nn">sys</span> """
764-
"""<span class="c"># SYS IMPORTING</span>""")
766+
"""<span class="c1"># SYS IMPORTING</span>""")
765767
yield assert_count(expected_expr, result, 1)
766768

767769
## raw.txt

0 commit comments

Comments
 (0)