diff options
Diffstat (limited to 'tests/test_build_latex.py')
-rw-r--r-- | tests/test_build_latex.py | 39 |
1 files changed, 16 insertions, 23 deletions
diff --git a/tests/test_build_latex.py b/tests/test_build_latex.py index cc79580f6..bb1904d2c 100644 --- a/tests/test_build_latex.py +++ b/tests/test_build_latex.py @@ -21,7 +21,6 @@ from sphinx.builders.latex import default_latex_documents from sphinx.config import Config from sphinx.errors import SphinxError from sphinx.testing.util import strip_escseq -from sphinx.util import docutils from sphinx.util.osutil import cd, ensuredir from sphinx.writers.latex import LaTeXTranslator @@ -198,7 +197,7 @@ def test_latex_basic_manual_ja(app, status, warning): app.builder.build_all() result = (app.outdir / 'test.tex').read_text(encoding='utf8') print(result) - assert r'\def\sphinxdocclass{jsbook}' in result + assert r'\def\sphinxdocclass{ujbook}' in result assert r'\documentclass[letterpaper,10pt,dvipdfmx]{sphinxmanual}' in result @@ -211,7 +210,7 @@ def test_latex_basic_howto_ja(app, status, warning): app.builder.build_all() result = (app.outdir / 'test.tex').read_text(encoding='utf8') print(result) - assert r'\def\sphinxdocclass{jreport}' in result + assert r'\def\sphinxdocclass{ujreport}' in result assert r'\documentclass[letterpaper,10pt,dvipdfmx]{sphinxhowto}' in result @@ -278,14 +277,14 @@ def test_latex_title_after_admonitions(app, status, warning): @pytest.mark.sphinx('latex', testroot='basic', - confoverrides={'release': '1.0'}) + confoverrides={'release': '1.0_0'}) def test_latex_release(app, status, warning): app.builder.build_all() result = (app.outdir / 'test.tex').read_text() print(result) print(status.getvalue()) print(warning.getvalue()) - assert r'\release{1.0}' in result + assert r'\release{1.0\_0}' in result assert r'\renewcommand{\releasename}{Release}' in result @@ -525,7 +524,7 @@ def test_babel_with_no_language_settings(app, status, warning): print(warning.getvalue()) assert '\\documentclass[letterpaper,10pt,english]{sphinxmanual}' in result assert '\\usepackage{babel}' in result - assert '\\usepackage{times}' in result + assert '\\usepackage{tgtermes}' in result assert '\\usepackage[Bjarne]{fncychap}' in result assert ('\\addto\\captionsenglish{\\renewcommand{\\contentsname}{Table of content}}\n' in result) @@ -550,7 +549,7 @@ def test_babel_with_language_de(app, status, warning): print(warning.getvalue()) assert '\\documentclass[letterpaper,10pt,ngerman]{sphinxmanual}' in result assert '\\usepackage{babel}' in result - assert '\\usepackage{times}' in result + assert '\\usepackage{tgtermes}' in result assert '\\usepackage[Sonny]{fncychap}' in result assert ('\\addto\\captionsngerman{\\renewcommand{\\contentsname}{Table of content}}\n' in result) @@ -575,7 +574,7 @@ def test_babel_with_language_ru(app, status, warning): print(warning.getvalue()) assert '\\documentclass[letterpaper,10pt,russian]{sphinxmanual}' in result assert '\\usepackage{babel}' in result - assert '\\usepackage{times}' not in result + assert '\\usepackage{tgtermes}' not in result assert '\\usepackage[Sonny]{fncychap}' in result assert ('\\addto\\captionsrussian{\\renewcommand{\\contentsname}{Table of content}}\n' in result) @@ -600,7 +599,7 @@ def test_babel_with_language_tr(app, status, warning): print(warning.getvalue()) assert '\\documentclass[letterpaper,10pt,turkish]{sphinxmanual}' in result assert '\\usepackage{babel}' in result - assert '\\usepackage{times}' in result + assert '\\usepackage{tgtermes}' in result assert '\\usepackage[Sonny]{fncychap}' in result assert ('\\addto\\captionsturkish{\\renewcommand{\\contentsname}{Table of content}}\n' in result) @@ -625,7 +624,7 @@ def test_babel_with_language_ja(app, status, warning): print(warning.getvalue()) assert '\\documentclass[letterpaper,10pt,dvipdfmx]{sphinxmanual}' in result assert '\\usepackage{babel}' not in result - assert '\\usepackage{times}' in result + assert '\\usepackage{tgtermes}' in result assert '\\usepackage[Sonny]{fncychap}' not in result assert '\\renewcommand{\\contentsname}{Table of content}\n' in result assert '\\shorthandoff' not in result @@ -649,7 +648,7 @@ def test_babel_with_unknown_language(app, status, warning): print(warning.getvalue()) assert '\\documentclass[letterpaper,10pt,english]{sphinxmanual}' in result assert '\\usepackage{babel}' in result - assert '\\usepackage{times}' in result + assert '\\usepackage{tgtermes}' in result assert '\\usepackage[Sonny]{fncychap}' in result assert ('\\addto\\captionsenglish{\\renewcommand{\\contentsname}{Table of content}}\n' in result) @@ -677,7 +676,7 @@ def test_polyglossia_with_language_de(app, status, warning): assert '\\documentclass[letterpaper,10pt,german]{sphinxmanual}' in result assert '\\usepackage{polyglossia}' in result assert '\\setmainlanguage[spelling=new]{german}' in result - assert '\\usepackage{times}' not in result + assert '\\usepackage{tgtermes}' not in result assert '\\usepackage[Sonny]{fncychap}' in result assert ('\\addto\\captionsgerman{\\renewcommand{\\contentsname}{Table of content}}\n' in result) @@ -703,7 +702,7 @@ def test_polyglossia_with_language_de_1901(app, status, warning): assert '\\documentclass[letterpaper,10pt,german]{sphinxmanual}' in result assert '\\usepackage{polyglossia}' in result assert '\\setmainlanguage[spelling=old]{german}' in result - assert '\\usepackage{times}' not in result + assert '\\usepackage{tgtermes}' not in result assert '\\usepackage[Sonny]{fncychap}' in result assert ('\\addto\\captionsgerman{\\renewcommand{\\contentsname}{Table of content}}\n' in result) @@ -1038,7 +1037,7 @@ def test_toctree_maxdepth_howto(app, status, warning): @pytest.mark.sphinx( 'latex', testroot='toctree-maxdepth', - confoverrides={'master_doc': 'foo'}) + confoverrides={'root_doc': 'foo'}) def test_toctree_not_found(app, status, warning): app.builder.build_all() result = (app.outdir / 'python.tex').read_text() @@ -1052,7 +1051,7 @@ def test_toctree_not_found(app, status, warning): @pytest.mark.sphinx( 'latex', testroot='toctree-maxdepth', - confoverrides={'master_doc': 'bar'}) + confoverrides={'root_doc': 'bar'}) def test_toctree_without_maxdepth(app, status, warning): app.builder.build_all() result = (app.outdir / 'python.tex').read_text() @@ -1065,7 +1064,7 @@ def test_toctree_without_maxdepth(app, status, warning): @pytest.mark.sphinx( 'latex', testroot='toctree-maxdepth', - confoverrides={'master_doc': 'qux'}) + confoverrides={'root_doc': 'qux'}) def test_toctree_with_deeper_maxdepth(app, status, warning): app.builder.build_all() result = (app.outdir / 'python.tex').read_text() @@ -1171,8 +1170,6 @@ def test_maxlistdepth_at_ten(app, status, warning): compile_latex_document(app, 'python.tex') -@pytest.mark.skipif(docutils.__version_info__ < (0, 13), - reason='docutils-0.13 or above is required') @pytest.mark.sphinx('latex', testroot='latex-table') @pytest.mark.test_params(shared_result='latex-table') def test_latex_table_tabulars(app, status, warning): @@ -1242,8 +1239,6 @@ def test_latex_table_tabulars(app, status, warning): assert actual == expected -@pytest.mark.skipif(docutils.__version_info__ < (0, 13), - reason='docutils-0.13 or above is required') @pytest.mark.sphinx('latex', testroot='latex-table') @pytest.mark.test_params(shared_result='latex-table') def test_latex_table_longtable(app, status, warning): @@ -1303,8 +1298,6 @@ def test_latex_table_longtable(app, status, warning): assert actual == expected -@pytest.mark.skipif(docutils.__version_info__ < (0, 13), - reason='docutils-0.13 or above is required') @pytest.mark.sphinx('latex', testroot='latex-table') @pytest.mark.test_params(shared_result='latex-table') def test_latex_table_complex_tables(app, status, warning): @@ -1539,7 +1532,7 @@ def test_latex_figure_in_admonition(app, status, warning): def test_default_latex_documents(): from sphinx.util import texescape texescape.init() - config = Config({'master_doc': 'index', + config = Config({'root_doc': 'index', 'project': 'STASI™ Documentation', 'author': "Wolfgang Schäuble & G'Beckstein."}) config.init_values() |