diff options
| author | Adam Turner <9087854+AA-Turner@users.noreply.github.com> | 2022-10-16 16:50:53 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-16 16:50:53 +0100 |
| commit | 592b46c43123f5aa81b311b012a7b85a605d91b8 (patch) | |
| tree | 8ee235c7cbf9c1484f62a4b33dce38364dc018da /tests/test_build_html.py | |
| parent | e70a0fac6d17596d71c0107f7509369995a59673 (diff) | |
| download | sphinx-git-592b46c43123f5aa81b311b012a7b85a605d91b8.tar.gz | |
Revert ``html_codeblock_linenos_style`` removal (#10922)
Diffstat (limited to 'tests/test_build_html.py')
| -rw-r--r-- | tests/test_build_html.py | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/tests/test_build_html.py b/tests/test_build_html.py index 1a717f152..fa0bbac7c 100644 --- a/tests/test_build_html.py +++ b/tests/test_build_html.py @@ -1598,8 +1598,21 @@ def test_html_scaled_image_link(app): context) -@pytest.mark.sphinx('html', testroot='reST-code-block') -def test_html_codeblock_linenos_style(app): +@pytest.mark.sphinx('html', testroot='reST-code-block', + confoverrides={'html_codeblock_linenos_style': 'table'}) +def test_html_codeblock_linenos_style_table(app): + app.build() + content = (app.outdir / 'index.html').read_text(encoding='utf8') + + assert ('<div class="linenodiv"><pre><span class="normal">1</span>\n' + '<span class="normal">2</span>\n' + '<span class="normal">3</span>\n' + '<span class="normal">4</span></pre></div>') in content + + +@pytest.mark.sphinx('html', testroot='reST-code-block', + confoverrides={'html_codeblock_linenos_style': 'inline'}) +def test_html_codeblock_linenos_style_inline(app): app.build() content = (app.outdir / 'index.html').read_text(encoding='utf8') |
