Skip to content

Commit

Permalink
Fix and update test_build_latex_doc to try with booktabs and colorrows
Browse files Browse the repository at this point in the history
  • Loading branch information
jfbu committed Aug 13, 2022
1 parent a2a02c0 commit 24eed3b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/test_build_latex.py
Expand Up @@ -92,7 +92,9 @@ def test_build_latex_doc(app, status, warning, engine, docclass):
app.config.latex_engine = engine
app.config.latex_documents = [app.config.latex_documents[0][:4] + (docclass,)]
if engine == 'xelatex':
app.config.latex_use_booktabs = True
app.config.latex_table_style = ['booktabs']
elif engine == 'lualatex':
app.config.latex_table_style = ['colorrows']
app.builder.init()

LaTeXTranslator.ignore_missing_images = True
Expand Down Expand Up @@ -1329,7 +1331,7 @@ def get_expected(name):

@pytest.mark.sphinx('latex', testroot='latex-table',
confoverrides={'latex_table_style': ['booktabs', 'colorrows']})
def test_latex_table_with_booktabs(app, status, warning):
def test_latex_table_with_booktabs_and_colorrows(app, status, warning):
app.builder.build_all()
result = (app.outdir / 'python.tex').read_text(encoding='utf8')
assert r'\PassOptionsToPackage{booktabs}{sphinx}' in result
Expand Down

0 comments on commit 24eed3b

Please sign in to comment.