diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2019-12-28 13:36:55 +0300 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-03-06 16:11:25 +0300 |
commit | cdbefb600f74c35b31cea3fa1535bdf536dbf76b (patch) | |
tree | 99077ed381655dd24aa9bdf11ab44997a68d9af7 /tests/test_build_latex.py | |
parent | a13ec4f41cb151d51eb25011082a2668e443d498 (diff) |
Support user defined LaTeX themes
Diffstat (limited to 'tests/test_build_latex.py')
-rw-r--r-- | tests/test_build_latex.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/test_build_latex.py b/tests/test_build_latex.py index 88c79b5ed..d55a3b895 100644 --- a/tests/test_build_latex.py +++ b/tests/test_build_latex.py @@ -20,7 +20,7 @@ from test_build_html import ENV_WARNINGS from sphinx.builders.latex import default_latex_documents from sphinx.config import Config -from sphinx.errors import SphinxError +from sphinx.errors import SphinxError, ThemeError from sphinx.testing.util import strip_escseq from sphinx.util import docutils from sphinx.util.osutil import cd, ensuredir @@ -215,6 +215,15 @@ def test_latex_basic_howto_ja(app, status, warning): assert r'\documentclass[letterpaper,10pt,dvipdfmx]{sphinxhowto}' in result +@pytest.mark.sphinx('latex', testroot='latex-theme') +def test_latex_theme(app, status, warning): + app.builder.build_all() + result = (app.outdir / 'python.tex').read_text(encoding='utf8') + print(result) + assert r'\def\sphinxdocclass{book}' in result + assert r'\documentclass[letterpaper,10pt,english]{sphinxbook}' in result + + @pytest.mark.sphinx('latex', testroot='basic', confoverrides={'language': 'zh'}) def test_latex_additional_settings_for_language_code(app, status, warning): app.builder.build_all() @@ -1465,6 +1474,7 @@ def test_default_latex_documents(): 'author': "Wolfgang Schäuble & G'Beckstein."}) config.init_values() config.add('latex_engine', None, True, None) + config.add('latex_theme', 'manual', True, None) expected = [('index', 'stasi.tex', 'STASI™ Documentation', r"Wolfgang Schäuble \& G\textquotesingle{}Beckstein.\@{}", 'manual')] assert default_latex_documents(config) == expected |