summaryrefslogtreecommitdiff
path: root/tests/test_build_latex.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_build_latex.py')
-rw-r--r--tests/test_build_latex.py18
1 files changed, 16 insertions, 2 deletions
diff --git a/tests/test_build_latex.py b/tests/test_build_latex.py
index ab91d7a48..e7b61ad0c 100644
--- a/tests/test_build_latex.py
+++ b/tests/test_build_latex.py
@@ -165,13 +165,15 @@ def test_latex_warnings(app, status, warning):
@pytest.mark.sphinx('latex', testroot='basic')
-def test_latex_title(app, status, warning):
+def test_latex_basic(app, status, warning):
app.builder.build_all()
result = (app.outdir / 'test.tex').text(encoding='utf8')
print(result)
print(status.getvalue())
print(warning.getvalue())
- assert '\\title{The basic Sphinx documentation for testing}' in result
+ assert r'\title{The basic Sphinx documentation for testing}' in result
+ assert r'\release{}' in result
+ assert r'\renewcommand{\releasename}{}' in result
@pytest.mark.sphinx('latex', testroot='latex-title')
@@ -184,6 +186,18 @@ def test_latex_title_after_admonitions(app, status, warning):
assert '\\title{test-latex-title}' in result
+@pytest.mark.sphinx('latex', testroot='basic',
+ confoverrides={'release': '1.0'})
+def test_latex_release(app, status, warning):
+ app.builder.build_all()
+ result = (app.outdir / 'test.tex').text(encoding='utf8')
+ print(result)
+ print(status.getvalue())
+ print(warning.getvalue())
+ assert r'\release{1.0}' in result
+ assert r'\renewcommand{\releasename}{Release}' in result
+
+
@pytest.mark.sphinx('latex', testroot='numfig',
confoverrides={'numfig': True})
def test_numref(app, status, warning):