File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,10 +49,7 @@ def check_viewcode_output(app: SphinxTestApp) -> str:
4949 ) in result
5050 assert '<span>@decorator</span>\n ' in result
5151 assert f'<span>class</span>{ sp } <span>Class1</span><span>:</span>\n ' in result
52- assert (
53- '<span> </span>'
54- '<span>"""this is Class1"""</span></div>\n '
55- ) in result
52+ assert ('<span> </span><span>"""this is Class1"""</span></div>\n ' ) in result
5653
5754 return result
5855
Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ def test_default_highlight(logger: mock.Mock) -> None:
9393 ret = bridge .highlight_block ('print "Hello sphinx world"' , 'default' )
9494 assert ret == (
9595 '<div class="highlight"><pre><span></span><span class="nb">print</span> '
96- '<span class="s2">" Hello sphinx world" </span>\n </pre></div>\n '
96+ '<span class="s2">" Hello sphinx world" </span>\n </pre></div>\n '
9797 )
9898
9999 # default: fallbacks to none if highlighting failed
@@ -107,7 +107,7 @@ def test_default_highlight(logger: mock.Mock) -> None:
107107 assert ret == (
108108 '<div class="highlight"><pre><span></span><span class="nb">print</span>'
109109 '<span class="p">(</span>'
110- '<span class="s2">" Hello sphinx world" </span>'
110+ '<span class="s2">" Hello sphinx world" </span>'
111111 '<span class="p">)</span>\n </pre></div>\n '
112112 )
113113
@@ -116,7 +116,7 @@ def test_default_highlight(logger: mock.Mock) -> None:
116116 assert ret == (
117117 '<div class="highlight"><pre><span></span><span class="nb">print</span>'
118118 '<span class="p">(</span>'
119- '<span class="s2">" Hello sphinx world" </span>'
119+ '<span class="s2">" Hello sphinx world" </span>'
120120 '<span class="p">)</span>\n </pre></div>\n '
121121 )
122122
Original file line number Diff line number Diff line change @@ -1647,7 +1647,7 @@ def test_additional_targets_should_not_be_translated(app: SphinxTestApp) -> None
16471647 assert_count (expected_expr , result , 2 )
16481648
16491649 # ruby code block should not be translated but be highlighted
1650- expected_expr = """<span class="s1">' result' </span>"""
1650+ expected_expr = """<span class="s1">" result" </span>"""
16511651 assert_count (expected_expr , result , 1 )
16521652
16531653 # C code block without lang should not be translated and *ruby* highlighted
@@ -1746,7 +1746,7 @@ def test_additional_targets_should_be_translated(app: SphinxTestApp) -> None:
17461746 assert_count (expected_expr , result , 2 )
17471747
17481748 # ruby code block should be translated and be highlighted
1749- expected_expr = """<span class="s1">' RESULT' </span>"""
1749+ expected_expr = """<span class="s1">" RESULT" </span>"""
17501750 assert_count (expected_expr , result , 1 )
17511751
17521752 # C code block without lang should be translated and *ruby* highlighted
You can’t perform that action at this time.
0 commit comments