mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix tests after dropping latex threeparttable
This commit is contained in:
parent
5c87879754
commit
e21a1702c2
@ -31,7 +31,7 @@ from test_build_html import ENV_WARNINGS
|
|||||||
LATEX_ENGINES = ['pdflatex', 'lualatex', 'xelatex']
|
LATEX_ENGINES = ['pdflatex', 'lualatex', 'xelatex']
|
||||||
DOCCLASSES = ['howto', 'manual']
|
DOCCLASSES = ['howto', 'manual']
|
||||||
STYLEFILES = ['article.cls', 'fancyhdr.sty', 'titlesec.sty', 'amsmath.sty',
|
STYLEFILES = ['article.cls', 'fancyhdr.sty', 'titlesec.sty', 'amsmath.sty',
|
||||||
'framed.sty', 'color.sty', 'fancyvrb.sty', 'threeparttable.sty',
|
'framed.sty', 'color.sty', 'fancyvrb.sty',
|
||||||
'fncychap.sty', 'geometry.sty', 'kvoptions.sty', 'hyperref.sty']
|
'fncychap.sty', 'geometry.sty', 'kvoptions.sty', 'hyperref.sty']
|
||||||
|
|
||||||
LATEX_WARNINGS = ENV_WARNINGS + """\
|
LATEX_WARNINGS = ENV_WARNINGS + """\
|
||||||
@ -492,7 +492,7 @@ def test_footnote(app, status, warning):
|
|||||||
assert ('\\bibitem[bar]{\\detokenize{bar}}'
|
assert ('\\bibitem[bar]{\\detokenize{bar}}'
|
||||||
'{\\phantomsection\\label{\\detokenize{footnote:bar}} '
|
'{\\phantomsection\\label{\\detokenize{footnote:bar}} '
|
||||||
'\ncite\n}') in result
|
'\ncite\n}') in result
|
||||||
assert '\\caption{Table caption \\sphinxfootnotemark[4]' in result
|
assert '\\sphinxcaptionof{table}{Table caption \\sphinxfootnotemark[4]' in result
|
||||||
assert ('\\hline%\n\\begin{footnotetext}[4]\\sphinxAtStartFootnote\n'
|
assert ('\\hline%\n\\begin{footnotetext}[4]\\sphinxAtStartFootnote\n'
|
||||||
'footnote in table caption\n%\n\\end{footnotetext}\\ignorespaces %\n'
|
'footnote in table caption\n%\n\\end{footnotetext}\\ignorespaces %\n'
|
||||||
'\\begin{footnotetext}[5]\\sphinxAtStartFootnote\n'
|
'\\begin{footnotetext}[5]\\sphinxAtStartFootnote\n'
|
||||||
@ -501,7 +501,7 @@ def test_footnote(app, status, warning):
|
|||||||
assert ('Information about VIDIOC\\_CROPCAP %\n'
|
assert ('Information about VIDIOC\\_CROPCAP %\n'
|
||||||
'\\begin{footnote}[6]\\sphinxAtStartFootnote\n'
|
'\\begin{footnote}[6]\\sphinxAtStartFootnote\n'
|
||||||
'footnote in table not in header\n%\n\\end{footnote}\n\\\\\n\\hline\n'
|
'footnote in table not in header\n%\n\\end{footnote}\n\\\\\n\\hline\n'
|
||||||
'\\end{tabulary}\n\\end{threeparttable}\n'
|
'\\end{tabulary}\n'
|
||||||
'\\par\n\\sphinxattableend\\end{savenotes}\n') in result
|
'\\par\n\\sphinxattableend\\end{savenotes}\n') in result
|
||||||
|
|
||||||
|
|
||||||
@ -517,7 +517,8 @@ def test_reference_in_caption_and_codeblock_in_footnote(app, status, warning):
|
|||||||
'{\\hyperref[\\detokenize{index:authoryear}]'
|
'{\\hyperref[\\detokenize{index:authoryear}]'
|
||||||
'{\\sphinxcrossref{{[}AuthorYear{]}}}}.}' in result)
|
'{\\sphinxcrossref{{[}AuthorYear{]}}}}.}' in result)
|
||||||
assert '\\chapter{The section with a reference to {[}AuthorYear{]}}' in result
|
assert '\\chapter{The section with a reference to {[}AuthorYear{]}}' in result
|
||||||
assert '\\caption{The table title with a reference to {[}AuthorYear{]}}' in result
|
assert ('\\sphinxcaptionof{table}{The table title with a reference'
|
||||||
|
' to {[}AuthorYear{]}}' in result)
|
||||||
assert '\\paragraph{The rubric title with a reference to {[}AuthorYear{]}}' in result
|
assert '\\paragraph{The rubric title with a reference to {[}AuthorYear{]}}' in result
|
||||||
assert ('\\chapter{The section with a reference to \\sphinxfootnotemark[4]}\n'
|
assert ('\\chapter{The section with a reference to \\sphinxfootnotemark[4]}\n'
|
||||||
'\\label{\\detokenize{index:the-section-with-a-reference-to}}'
|
'\\label{\\detokenize{index:the-section-with-a-reference-to}}'
|
||||||
@ -527,8 +528,8 @@ def test_reference_in_caption_and_codeblock_in_footnote(app, status, warning):
|
|||||||
'\\sphinxfootnotemark[6].}\\label{\\detokenize{index:id27}}\\end{figure}\n'
|
'\\sphinxfootnotemark[6].}\\label{\\detokenize{index:id27}}\\end{figure}\n'
|
||||||
'%\n\\begin{footnotetext}[6]\\sphinxAtStartFootnote\n'
|
'%\n\\begin{footnotetext}[6]\\sphinxAtStartFootnote\n'
|
||||||
'Footnote in caption\n%\n\\end{footnotetext}')in result
|
'Footnote in caption\n%\n\\end{footnotetext}')in result
|
||||||
assert ('\\caption{footnote \\sphinxfootnotemark[7] '
|
assert ('\\sphinxcaptionof{table}{footnote \\sphinxfootnotemark[7] in '
|
||||||
'in caption of normal table}\\label{\\detokenize{index:id28}}') in result
|
'caption of normal table}\\label{\\detokenize{index:id28}}') in result
|
||||||
assert ('\\caption{footnote \\sphinxfootnotemark[8] '
|
assert ('\\caption{footnote \\sphinxfootnotemark[8] '
|
||||||
'in caption \\sphinxfootnotemark[9] of longtable\\strut}') in result
|
'in caption \\sphinxfootnotemark[9] of longtable\\strut}') in result
|
||||||
assert ('\\endlastfoot\n%\n\\begin{footnotetext}[8]\\sphinxAtStartFootnote\n'
|
assert ('\\endlastfoot\n%\n\\begin{footnotetext}[8]\\sphinxAtStartFootnote\n'
|
||||||
@ -894,10 +895,11 @@ def test_latex_table_tabulars(app, status, warning):
|
|||||||
# table having caption
|
# table having caption
|
||||||
table = tables['table having caption']
|
table = tables['table having caption']
|
||||||
assert ('\\begin{savenotes}\\sphinxattablestart\n\\centering\n'
|
assert ('\\begin{savenotes}\\sphinxattablestart\n\\centering\n'
|
||||||
'\\begin{threeparttable}\n\\capstart\\caption{caption for table}'
|
'\\sphinxcaptionof{table}{caption for table}'
|
||||||
'\\label{\\detokenize{tabular:id1}}' in table)
|
'\\label{\\detokenize{tabular:id1}}\n'
|
||||||
|
'\\sphinxaftercaption' in table)
|
||||||
assert ('\\begin{tabulary}{\\linewidth}[t]{|T|T|}' in table)
|
assert ('\\begin{tabulary}{\\linewidth}[t]{|T|T|}' in table)
|
||||||
assert ('\\hline\n\\end{tabulary}\n\\end{threeparttable}'
|
assert ('\\hline\n\\end{tabulary}'
|
||||||
'\n\\par\n\\sphinxattableend\\end{savenotes}' in table)
|
'\n\\par\n\\sphinxattableend\\end{savenotes}' in table)
|
||||||
|
|
||||||
# table having verbatim
|
# table having verbatim
|
||||||
|
Loading…
Reference in New Issue
Block a user