summaryrefslogtreecommitdiff
path: root/tests/test_build_latex.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2020-04-20 00:49:17 +0900
committerGitHub <noreply@github.com>2020-04-20 00:49:17 +0900
commit66744c656ef31811f7638b7293803b7a2b62376d (patch)
treeac2796cbe14615f250309b5cf3ac0ba4f08239fb /tests/test_build_latex.py
parent776ec7957c3407a5ed75dc4369a0042d91698bd1 (diff)
parent301b823bd4949fbf91cc78a72721d812e2065901 (diff)
downloadsphinx-git-66744c656ef31811f7638b7293803b7a2b62376d.tar.gz
Merge pull request #7413 from tk0miya/papersize_for_latex_theme
LaTeX: Allow to override papersize and pointsize from LaTeX themes
Diffstat (limited to 'tests/test_build_latex.py')
-rw-r--r--tests/test_build_latex.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/test_build_latex.py b/tests/test_build_latex.py
index 61020b861..ba70debc2 100644
--- a/tests/test_build_latex.py
+++ b/tests/test_build_latex.py
@@ -221,7 +221,18 @@ def test_latex_theme(app, status, warning):
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
+ assert r'\documentclass[a4paper,12pt,english]{sphinxbook}' in result
+
+
+@pytest.mark.sphinx('latex', testroot='latex-theme',
+ confoverrides={'latex_elements': {'papersize': 'b5paper',
+ 'pointsize': '9pt'}})
+def test_latex_theme_papersize(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[b5paper,9pt,english]{sphinxbook}' in result
@pytest.mark.sphinx('latex', testroot='basic', confoverrides={'language': 'zh'})