mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
test: Omit master_doc settings from testcases
This commit is contained in:
parent
657fa843c8
commit
114ff77f68
@ -4,5 +4,4 @@ import sys
|
||||
sys.path.insert(0, os.path.abspath('.'))
|
||||
extensions = ['enumerable_node']
|
||||
|
||||
master_doc = 'index'
|
||||
numfig = True
|
||||
|
@ -13,7 +13,6 @@ from sphinx.writers.text import TextTranslator
|
||||
|
||||
|
||||
project = 'test'
|
||||
master_doc = 'index'
|
||||
|
||||
|
||||
class ConfHTMLTranslator(HTMLTranslator):
|
||||
|
@ -4,4 +4,3 @@ import sys
|
||||
sys.path.insert(0, os.path.dirname(os.path.abspath('.')))
|
||||
|
||||
project = 'test'
|
||||
master_doc = 'index'
|
||||
|
@ -1,5 +1,3 @@
|
||||
master_doc = 'index'
|
||||
|
||||
latex_documents = [
|
||||
(master_doc, 'test.tex', 'The basic Sphinx documentation for testing', 'Sphinx', 'report')
|
||||
('index', 'test.tex', 'The basic Sphinx documentation for testing', 'Sphinx', 'report')
|
||||
]
|
||||
|
@ -1,7 +1,6 @@
|
||||
from sphinx.writers.html import HTMLTranslator
|
||||
|
||||
project = 'test'
|
||||
master_doc = 'index'
|
||||
|
||||
|
||||
class ConfHTMLTranslator(HTMLTranslator):
|
||||
|
@ -1,2 +1 @@
|
||||
project = 'test'
|
||||
master_doc = 'index'
|
||||
|
@ -1,5 +1,3 @@
|
||||
master_doc = 'index'
|
||||
|
||||
latex_documents = [
|
||||
(master_doc, 'test.tex', 'The basic Sphinx documentation for testing', 'Sphinx', 'report')
|
||||
('index', 'test.tex', 'The basic Sphinx documentation for testing', 'Sphinx', 'report')
|
||||
]
|
||||
|
@ -1 +0,0 @@
|
||||
master_doc = 'index'
|
@ -1,3 +1,2 @@
|
||||
master_doc = 'index'
|
||||
exclude_patterns = ['_build']
|
||||
numfig = True
|
||||
|
@ -1 +0,0 @@
|
||||
master_doc = 'index'
|
@ -1,3 +1,2 @@
|
||||
master_doc = 'index'
|
||||
html_theme = 'classic'
|
||||
exclude_patterns = ['_build']
|
||||
|
@ -1,3 +1,2 @@
|
||||
master_doc = 'index'
|
||||
html_theme = 'classic'
|
||||
exclude_patterns = ['_build']
|
||||
|
@ -1,3 +1,2 @@
|
||||
master_doc = 'index'
|
||||
html_theme = 'classic'
|
||||
exclude_patterns = ['_build']
|
||||
|
@ -1,5 +1,4 @@
|
||||
templates_path = ['_templates']
|
||||
master_doc = 'index'
|
||||
html_theme = 'base_theme2'
|
||||
html_theme_path = ['base_themes_dir']
|
||||
exclude_patterns = ['_build']
|
||||
|
@ -1,7 +1,5 @@
|
||||
master_doc = 'index'
|
||||
|
||||
latex_documents = [
|
||||
(master_doc, 'test.tex', 'The basic Sphinx documentation for testing', 'Sphinx', 'report')
|
||||
('index', 'test.tex', 'The basic Sphinx documentation for testing', 'Sphinx', 'report')
|
||||
]
|
||||
|
||||
|
||||
|
@ -1,3 +1,2 @@
|
||||
extensions = ['sphinx.ext.autosectionlabel']
|
||||
master_doc = 'index'
|
||||
autosectionlabel_prefix_document = True
|
||||
|
@ -1,2 +1 @@
|
||||
extensions = ['sphinx.ext.autosectionlabel']
|
||||
master_doc = 'index'
|
||||
|
@ -5,4 +5,3 @@ sys.path.insert(0, path.abspath(path.dirname(__file__)))
|
||||
|
||||
project = 'test project for doctest + autodoc reporting'
|
||||
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest']
|
||||
master_doc = 'index'
|
||||
|
@ -1,2 +1 @@
|
||||
extensions = ['sphinx.ext.githubpages']
|
||||
master_doc = 'index'
|
||||
|
@ -1,8 +1,7 @@
|
||||
extensions = ['sphinx.ext.graphviz']
|
||||
master_doc = 'index'
|
||||
exclude_patterns = ['_build']
|
||||
|
||||
latex_documents = [
|
||||
(master_doc, 'SphinxTests.tex', 'Sphinx Tests Documentation',
|
||||
('index', 'SphinxTests.tex', 'Sphinx Tests Documentation',
|
||||
'Georg Brandl', 'manual'),
|
||||
]
|
||||
|
@ -1,5 +1,4 @@
|
||||
extensions = ['sphinx.ext.ifconfig']
|
||||
master_doc = 'index'
|
||||
exclude_patterns = ['_build']
|
||||
|
||||
confval1 = True
|
||||
|
@ -1,2 +1 @@
|
||||
master_doc = 'index'
|
||||
extensions = ['sphinx.ext.imgconverter']
|
||||
|
@ -4,4 +4,3 @@ import sys
|
||||
sys.path.insert(0, os.path.abspath('.'))
|
||||
|
||||
extensions = ['sphinx.ext.inheritance_diagram']
|
||||
master_doc = 'index'
|
||||
|
@ -1,2 +1 @@
|
||||
extensions = ['sphinx.ext.intersphinx']
|
||||
master_doc = 'index'
|
||||
|
@ -2,7 +2,6 @@ from docutils.parsers.rst import Directive
|
||||
|
||||
from sphinx.ext.mathbase import math, displaymath
|
||||
|
||||
master_doc = 'index'
|
||||
extensions = ['sphinx.ext.mathjax']
|
||||
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
master_doc = 'index'
|
||||
|
||||
latex_documents = [
|
||||
(master_doc, 'test.tex', 'Math Extension Testing', 'Sphinx', 'report')]
|
||||
('index', 'test.tex', 'Math Extension Testing', 'Sphinx', 'report')
|
||||
]
|
||||
|
@ -1,4 +1,3 @@
|
||||
master_doc = 'index'
|
||||
|
||||
latex_documents = [
|
||||
(master_doc, 'test.tex', 'Math Extension Testing', 'Sphinx', 'report')]
|
||||
('index', 'test.tex', 'Math Extension Testing', 'Sphinx', 'report')
|
||||
]
|
||||
|
@ -1,7 +1,6 @@
|
||||
extensions = ['sphinx.ext.todo']
|
||||
master_doc = 'index'
|
||||
|
||||
latex_documents = [
|
||||
(master_doc, 'TodoTests.tex', 'Todo Tests Documentation',
|
||||
('index', 'TodoTests.tex', 'Todo Tests Documentation',
|
||||
'Robin Banks', 'manual'),
|
||||
]
|
||||
|
@ -1,4 +1,3 @@
|
||||
extensions = ['sphinx.ext.viewcode']
|
||||
master_doc = 'index'
|
||||
exclude_patterns = ['_build']
|
||||
viewcode_follow_imported_members = False
|
||||
|
@ -5,7 +5,6 @@ source_dir = os.path.abspath('.')
|
||||
if source_dir not in sys.path:
|
||||
sys.path.insert(0, source_dir)
|
||||
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode']
|
||||
master_doc = 'index'
|
||||
exclude_patterns = ['_build']
|
||||
|
||||
|
||||
|
@ -1,3 +1,2 @@
|
||||
master_doc = 'index'
|
||||
html_theme = 'classic'
|
||||
exclude_patterns = ['_build']
|
||||
|
@ -1,5 +1,3 @@
|
||||
master_doc = 'index'
|
||||
|
||||
latex_documents = [
|
||||
(master_doc, 'test.tex', 'The basic Sphinx documentation for testing', 'Sphinx', 'report')
|
||||
('index', 'test.tex', 'The basic Sphinx documentation for testing', 'Sphinx', 'report')
|
||||
]
|
||||
|
@ -1,4 +1,3 @@
|
||||
master_doc = 'index'
|
||||
project = 'Sphinx'
|
||||
version = '1.4.4'
|
||||
|
||||
|
@ -1,3 +1,2 @@
|
||||
master_doc = 'index'
|
||||
html_theme = 'classic'
|
||||
exclude_patterns = ['_build']
|
||||
|
@ -1,4 +1,3 @@
|
||||
master_doc = 'index'
|
||||
exclude_patterns = ['_build']
|
||||
|
||||
rst_epilog = '''
|
||||
|
@ -1,4 +1,3 @@
|
||||
master_doc = 'index'
|
||||
exclude_patterns = ['_build']
|
||||
|
||||
rst_epilog = '''
|
||||
|
@ -1 +0,0 @@
|
||||
master_doc = 'index'
|
@ -1,2 +1 @@
|
||||
master_doc = 'index'
|
||||
keep_warnings = True
|
||||
|
@ -1,4 +1,3 @@
|
||||
master_doc = 'index'
|
||||
numfig_format = {
|
||||
'figure': 'Fig. %s',
|
||||
'table': 'Table. %s',
|
||||
|
@ -1 +0,0 @@
|
||||
master_doc = 'index'
|
@ -1,5 +1,3 @@
|
||||
master_doc = 'index'
|
||||
|
||||
latex_documents = [
|
||||
(master_doc, 'test.tex', 'The basic Sphinx documentation for testing', 'Sphinx', 'report')
|
||||
('index', 'test.tex', 'The basic Sphinx documentation for testing', 'Sphinx', 'report')
|
||||
]
|
||||
|
@ -1,5 +1,3 @@
|
||||
master_doc = 'index'
|
||||
|
||||
extensions = ['sphinx.ext.imgmath'] # for math_numfig
|
||||
|
||||
latex_documents = [
|
||||
|
@ -1,5 +1,3 @@
|
||||
master_doc = 'index'
|
||||
|
||||
latex_documents = [
|
||||
(master_doc, 'test.tex', 'The basic Sphinx documentation for testing', 'Sphinx', 'report')
|
||||
('index', 'test.tex', 'The basic Sphinx documentation for testing', 'Sphinx', 'report')
|
||||
]
|
||||
|
@ -1,6 +1,4 @@
|
||||
master_doc = 'index'
|
||||
|
||||
# set empty string to the third column to use the first section title to document title
|
||||
latex_documents = [
|
||||
(master_doc, 'test.tex', '', 'Sphinx', 'report')
|
||||
('index', 'test.tex', '', 'Sphinx', 'report')
|
||||
]
|
||||
|
@ -1,3 +1,2 @@
|
||||
master_doc = 'index'
|
||||
html_theme = 'classic'
|
||||
exclude_patterns = ['_build']
|
||||
|
@ -1,5 +1,3 @@
|
||||
master_doc = 'index'
|
||||
|
||||
latex_documents = [
|
||||
(master_doc, 'test.tex', 'The basic Sphinx documentation for testing', 'Sphinx', 'report')
|
||||
('index', 'test.tex', 'The basic Sphinx documentation for testing', 'Sphinx', 'report')
|
||||
]
|
||||
|
@ -1,5 +1,3 @@
|
||||
master_doc = 'index'
|
||||
|
||||
latex_documents = [
|
||||
(master_doc, 'test.tex', 'The basic Sphinx documentation for testing', 'Sphinx', 'report')
|
||||
('index', 'test.tex', 'The basic Sphinx documentation for testing', 'Sphinx', 'report')
|
||||
]
|
||||
|
@ -1,4 +1,3 @@
|
||||
master_doc = 'index'
|
||||
html_theme = 'classic'
|
||||
exclude_patterns = ['_build']
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
master_doc = 'index'
|
@ -1,3 +1,2 @@
|
||||
master_doc = 'index'
|
||||
project = 'need <b>"escaped"</b> project'
|
||||
smartquotes = False
|
||||
|
@ -1,5 +1,3 @@
|
||||
master_doc = 'index'
|
||||
|
||||
latex_documents = [
|
||||
(master_doc, 'test.tex', 'The basic Sphinx documentation for testing', 'Sphinx', 'report')
|
||||
('index', 'test.tex', 'The basic Sphinx documentation for testing', 'Sphinx', 'report')
|
||||
]
|
||||
|
@ -1,3 +1,2 @@
|
||||
master_doc = 'index'
|
||||
html_theme = 'classic'
|
||||
exclude_patterns = ['_build']
|
||||
|
@ -3,7 +3,6 @@ import sys
|
||||
sys.path.insert(0, os.path.abspath('.'))
|
||||
|
||||
|
||||
master_doc = 'index'
|
||||
extensions = ['prolog_markdown_parser']
|
||||
|
||||
rst_prolog = '*Hello world*.\n\n'
|
||||
|
@ -2,5 +2,4 @@ import os
|
||||
import sys
|
||||
|
||||
sys.path.insert(0, os.path.abspath('sample-0.0.0-py3.7.egg'))
|
||||
master_doc = 'index'
|
||||
extensions = ['sphinx.ext.autodoc']
|
||||
|
@ -1,6 +1,5 @@
|
||||
master_doc = 'index'
|
||||
html_compact_lists = False
|
||||
|
||||
latex_documents = [
|
||||
(master_doc, 'test.tex', 'The basic Sphinx documentation for testing', 'Sphinx', 'report')
|
||||
('index', 'test.tex', 'The basic Sphinx documentation for testing', 'Sphinx', 'report')
|
||||
]
|
||||
|
@ -1,5 +1,3 @@
|
||||
master_doc = 'index'
|
||||
|
||||
latex_documents = [
|
||||
(master_doc, 'test.tex', 'The basic Sphinx documentation for testing', 'Sphinx', 'report')
|
||||
('index', 'test.tex', 'The basic Sphinx documentation for testing', 'Sphinx', 'report')
|
||||
]
|
||||
|
@ -1,3 +1,2 @@
|
||||
master_doc = 'index'
|
||||
exclude_patterns = ['_build']
|
||||
html_search_language = 'en'
|
||||
|
@ -1,5 +1,3 @@
|
||||
master_doc = 'index'
|
||||
|
||||
latex_documents = [
|
||||
(master_doc, 'test.tex', 'The basic Sphinx documentation for testing', 'Sphinx', 'report')
|
||||
('index', 'test.tex', 'The basic Sphinx documentation for testing', 'Sphinx', 'report')
|
||||
]
|
||||
|
@ -1,4 +1,3 @@
|
||||
master_doc = 'index'
|
||||
html_theme = 'classic'
|
||||
templates_path = ['_templates']
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
html_theme = 'test-theme'
|
||||
html_theme_path = ['.', 'test_theme']
|
||||
master_doc = 'index'
|
||||
exclude_patterns = ['_build']
|
||||
|
@ -1,3 +1,2 @@
|
||||
master_doc = 'index'
|
||||
html_theme = 'classic'
|
||||
exclude_patterns = ['_build']
|
||||
|
@ -1,4 +1,3 @@
|
||||
master_doc = 'index'
|
||||
html_theme = 'classic'
|
||||
exclude_patterns = ['_build']
|
||||
templates_path = ['_templates']
|
||||
|
@ -1,3 +1,2 @@
|
||||
master_doc = 'index'
|
||||
html_theme = 'classic'
|
||||
exclude_patterns = ['_build']
|
||||
|
@ -1,3 +1,2 @@
|
||||
master_doc = 'index'
|
||||
html_theme = 'classic'
|
||||
exclude_patterns = ['_build']
|
||||
|
@ -1,5 +1,3 @@
|
||||
master_doc = 'index'
|
||||
|
||||
latex_documents = [
|
||||
(master_doc, 'test.tex', 'The basic Sphinx documentation for testing', 'Sphinx', 'report')
|
||||
('index', 'test.tex', 'The basic Sphinx documentation for testing', 'Sphinx', 'report')
|
||||
]
|
||||
|
@ -1,7 +1,5 @@
|
||||
master_doc = 'index'
|
||||
|
||||
extensions = ['sphinx.ext.doctest']
|
||||
|
||||
latex_documents = [
|
||||
(master_doc, 'test.tex', 'The basic Sphinx documentation for testing', 'Sphinx', 'report')
|
||||
('index', 'test.tex', 'The basic Sphinx documentation for testing', 'Sphinx', 'report')
|
||||
]
|
||||
|
@ -1,4 +1,3 @@
|
||||
project = 'versioning test root'
|
||||
master_doc = 'index'
|
||||
source_suffix = '.txt'
|
||||
exclude_patterns = ['_build']
|
||||
|
@ -2,9 +2,8 @@ import os
|
||||
import sys
|
||||
sys.path.append(os.path.abspath('.'))
|
||||
|
||||
master_doc = 'index'
|
||||
extensions = ['sphinx.ext.autodoc']
|
||||
|
||||
latex_documents = [
|
||||
(master_doc, 'test.tex', 'test-warnings', 'Sphinx', 'report')
|
||||
('index', 'test.tex', 'test-warnings', 'Sphinx', 'report')
|
||||
]
|
||||
|
@ -73,12 +73,12 @@ def test_build_all(requests_head, make_app, nonascii_srcdir, buildername):
|
||||
|
||||
|
||||
def test_master_doc_not_found(tempdir, make_app):
|
||||
(tempdir / 'conf.py').write_text('master_doc = "index"')
|
||||
(tempdir / 'conf.py').write_text('')
|
||||
assert tempdir.listdir() == ['conf.py']
|
||||
|
||||
app = make_app('dummy', srcdir=tempdir)
|
||||
with pytest.raises(SphinxError):
|
||||
app.builder.build_all()
|
||||
app.builder.build_all() # no index.rst
|
||||
|
||||
|
||||
@pytest.mark.sphinx(buildername='text', testroot='circular')
|
||||
|
@ -31,8 +31,7 @@ def test_all(app, status, warning):
|
||||
|
||||
|
||||
def test_default_man_pages():
|
||||
config = Config({'master_doc': 'index',
|
||||
'project': 'STASI™ Documentation',
|
||||
config = Config({'project': 'STASI™ Documentation',
|
||||
'author': "Wolfgang Schäuble & G'Beckstein",
|
||||
'release': '1.0'})
|
||||
config.init_values()
|
||||
|
@ -93,8 +93,7 @@ def test_texinfo_citation(app, status, warning):
|
||||
|
||||
|
||||
def test_default_texinfo_documents():
|
||||
config = Config({'master_doc': 'index',
|
||||
'project': 'STASI™ Documentation',
|
||||
config = Config({'project': 'STASI™ Documentation',
|
||||
'author': "Wolfgang Schäuble & G'Beckstein"})
|
||||
config.init_values()
|
||||
expected = [('index', 'stasi', 'STASI™ Documentation',
|
||||
|
Loading…
Reference in New Issue
Block a user