mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix flake8 violations
This commit is contained in:
@@ -67,8 +67,8 @@ def test_code_block_caption_latex(app, status, warning):
|
||||
latex = (app.outdir / 'Python.tex').text(encoding='utf-8')
|
||||
caption = '\\sphinxSetupCaptionForVerbatim{caption \\sphinxstyleemphasis{test} rb}'
|
||||
label = '\\def\\sphinxLiteralBlockLabel{\\label{\\detokenize{caption:id1}}}'
|
||||
link = '\hyperref[\\detokenize{caption:name-test-rb}]' \
|
||||
'{Listing \\ref{\\detokenize{caption:name-test-rb}}}'
|
||||
link = '\hyperref[\\detokenize{caption:name-test-rb}]' \
|
||||
'{Listing \\ref{\\detokenize{caption:name-test-rb}}}'
|
||||
assert caption in latex
|
||||
assert label in latex
|
||||
assert link in latex
|
||||
@@ -79,12 +79,12 @@ def test_code_block_namedlink_latex(app, status, warning):
|
||||
app.builder.build_all()
|
||||
latex = (app.outdir / 'Python.tex').text(encoding='utf-8')
|
||||
label1 = '\\def\\sphinxLiteralBlockLabel{\\label{\\detokenize{caption:name-test-rb}}}'
|
||||
link1 = '\\hyperref[\\detokenize{caption:name-test-rb}]'\
|
||||
'{\\sphinxcrossref{\\DUrole{std,std-ref}{Ruby}}'
|
||||
link1 = '\\hyperref[\\detokenize{caption:name-test-rb}]'\
|
||||
'{\\sphinxcrossref{\\DUrole{std,std-ref}{Ruby}}'
|
||||
label2 = ('\\def\\sphinxLiteralBlockLabel'
|
||||
'{\\label{\\detokenize{namedblocks:some-ruby-code}}}')
|
||||
link2 = '\\hyperref[\\detokenize{namedblocks:some-ruby-code}]'\
|
||||
'{\\sphinxcrossref{\\DUrole{std,std-ref}{the ruby code}}}'
|
||||
link2 = '\\hyperref[\\detokenize{namedblocks:some-ruby-code}]'\
|
||||
'{\\sphinxcrossref{\\DUrole{std,std-ref}{the ruby code}}}'
|
||||
assert label1 in latex
|
||||
assert link1 in latex
|
||||
assert label2 in latex
|
||||
@@ -263,8 +263,8 @@ def test_literalinclude_caption_latex(app, status, warning):
|
||||
latex = (app.outdir / 'Python.tex').text(encoding='utf-8')
|
||||
caption = '\\sphinxSetupCaptionForVerbatim{caption \\sphinxstylestrong{test} py}'
|
||||
label = '\\def\\sphinxLiteralBlockLabel{\\label{\\detokenize{caption:id2}}}'
|
||||
link = '\hyperref[\\detokenize{caption:name-test-py}]' \
|
||||
'{Listing \\ref{\\detokenize{caption:name-test-py}}}'
|
||||
link = '\hyperref[\\detokenize{caption:name-test-py}]' \
|
||||
'{Listing \\ref{\\detokenize{caption:name-test-py}}}'
|
||||
assert caption in latex
|
||||
assert label in latex
|
||||
assert link in latex
|
||||
@@ -275,12 +275,12 @@ def test_literalinclude_namedlink_latex(app, status, warning):
|
||||
app.builder.build('index')
|
||||
latex = (app.outdir / 'Python.tex').text(encoding='utf-8')
|
||||
label1 = '\\def\\sphinxLiteralBlockLabel{\\label{\\detokenize{caption:name-test-py}}}'
|
||||
link1 = '\\hyperref[\\detokenize{caption:name-test-py}]'\
|
||||
'{\\sphinxcrossref{\\DUrole{std,std-ref}{Python}}'
|
||||
link1 = '\\hyperref[\\detokenize{caption:name-test-py}]'\
|
||||
'{\\sphinxcrossref{\\DUrole{std,std-ref}{Python}}'
|
||||
label2 = ('\\def\\sphinxLiteralBlockLabel'
|
||||
'{\\label{\\detokenize{namedblocks:some-python-code}}}')
|
||||
link2 = '\\hyperref[\\detokenize{namedblocks:some-python-code}]'\
|
||||
'{\\sphinxcrossref{\\DUrole{std,std-ref}{the python code}}}'
|
||||
link2 = '\\hyperref[\\detokenize{namedblocks:some-python-code}]'\
|
||||
'{\\sphinxcrossref{\\DUrole{std,std-ref}{the python code}}}'
|
||||
assert label1 in latex
|
||||
assert link1 in latex
|
||||
assert label2 in latex
|
||||
|
||||
Reference in New Issue
Block a user