test: Omit master_doc settings from testcases

This commit is contained in:
Takeshi KOMIYA 2019-01-02 22:20:22 +09:00
parent 657fa843c8
commit 114ff77f68
71 changed files with 26 additions and 111 deletions

View File

@ -4,5 +4,4 @@ import sys
sys.path.insert(0, os.path.abspath('.')) sys.path.insert(0, os.path.abspath('.'))
extensions = ['enumerable_node'] extensions = ['enumerable_node']
master_doc = 'index'
numfig = True numfig = True

View File

@ -13,7 +13,6 @@ from sphinx.writers.text import TextTranslator
project = 'test' project = 'test'
master_doc = 'index'
class ConfHTMLTranslator(HTMLTranslator): class ConfHTMLTranslator(HTMLTranslator):

View File

@ -4,4 +4,3 @@ import sys
sys.path.insert(0, os.path.dirname(os.path.abspath('.'))) sys.path.insert(0, os.path.dirname(os.path.abspath('.')))
project = 'test' project = 'test'
master_doc = 'index'

View File

@ -1,5 +1,3 @@
master_doc = 'index'
latex_documents = [ 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')
] ]

View File

@ -1,7 +1,6 @@
from sphinx.writers.html import HTMLTranslator from sphinx.writers.html import HTMLTranslator
project = 'test' project = 'test'
master_doc = 'index'
class ConfHTMLTranslator(HTMLTranslator): class ConfHTMLTranslator(HTMLTranslator):

View File

@ -1,2 +1 @@
project = 'test' project = 'test'
master_doc = 'index'

View File

@ -1,5 +1,3 @@
master_doc = 'index'
latex_documents = [ 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')
] ]

View File

@ -1 +0,0 @@
master_doc = 'index'

View File

@ -1,3 +1,2 @@
master_doc = 'index'
exclude_patterns = ['_build'] exclude_patterns = ['_build']
numfig = True numfig = True

View File

@ -1 +0,0 @@
master_doc = 'index'

View File

@ -1,3 +1,2 @@
master_doc = 'index'
html_theme = 'classic' html_theme = 'classic'
exclude_patterns = ['_build'] exclude_patterns = ['_build']

View File

@ -1,3 +1,2 @@
master_doc = 'index'
html_theme = 'classic' html_theme = 'classic'
exclude_patterns = ['_build'] exclude_patterns = ['_build']

View File

@ -1,3 +1,2 @@
master_doc = 'index'
html_theme = 'classic' html_theme = 'classic'
exclude_patterns = ['_build'] exclude_patterns = ['_build']

View File

@ -1,5 +1,4 @@
templates_path = ['_templates'] templates_path = ['_templates']
master_doc = 'index'
html_theme = 'base_theme2' html_theme = 'base_theme2'
html_theme_path = ['base_themes_dir'] html_theme_path = ['base_themes_dir']
exclude_patterns = ['_build'] exclude_patterns = ['_build']

View File

@ -1,7 +1,5 @@
master_doc = 'index'
latex_documents = [ 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')
] ]

View File

@ -1,3 +1,2 @@
extensions = ['sphinx.ext.autosectionlabel'] extensions = ['sphinx.ext.autosectionlabel']
master_doc = 'index'
autosectionlabel_prefix_document = True autosectionlabel_prefix_document = True

View File

@ -1,2 +1 @@
extensions = ['sphinx.ext.autosectionlabel'] extensions = ['sphinx.ext.autosectionlabel']
master_doc = 'index'

View File

@ -5,4 +5,3 @@ sys.path.insert(0, path.abspath(path.dirname(__file__)))
project = 'test project for doctest + autodoc reporting' project = 'test project for doctest + autodoc reporting'
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest'] extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest']
master_doc = 'index'

View File

@ -1,2 +1 @@
extensions = ['sphinx.ext.githubpages'] extensions = ['sphinx.ext.githubpages']
master_doc = 'index'

View File

@ -1,8 +1,7 @@
extensions = ['sphinx.ext.graphviz'] extensions = ['sphinx.ext.graphviz']
master_doc = 'index'
exclude_patterns = ['_build'] exclude_patterns = ['_build']
latex_documents = [ latex_documents = [
(master_doc, 'SphinxTests.tex', 'Sphinx Tests Documentation', ('index', 'SphinxTests.tex', 'Sphinx Tests Documentation',
'Georg Brandl', 'manual'), 'Georg Brandl', 'manual'),
] ]

View File

@ -1,5 +1,4 @@
extensions = ['sphinx.ext.ifconfig'] extensions = ['sphinx.ext.ifconfig']
master_doc = 'index'
exclude_patterns = ['_build'] exclude_patterns = ['_build']
confval1 = True confval1 = True

View File

@ -1,2 +1 @@
master_doc = 'index'
extensions = ['sphinx.ext.imgconverter'] extensions = ['sphinx.ext.imgconverter']

View File

@ -4,4 +4,3 @@ import sys
sys.path.insert(0, os.path.abspath('.')) sys.path.insert(0, os.path.abspath('.'))
extensions = ['sphinx.ext.inheritance_diagram'] extensions = ['sphinx.ext.inheritance_diagram']
master_doc = 'index'

View File

@ -1,2 +1 @@
extensions = ['sphinx.ext.intersphinx'] extensions = ['sphinx.ext.intersphinx']
master_doc = 'index'

View File

@ -2,7 +2,6 @@ from docutils.parsers.rst import Directive
from sphinx.ext.mathbase import math, displaymath from sphinx.ext.mathbase import math, displaymath
master_doc = 'index'
extensions = ['sphinx.ext.mathjax'] extensions = ['sphinx.ext.mathjax']

View File

@ -1,4 +1,3 @@
master_doc = 'index'
latex_documents = [ latex_documents = [
(master_doc, 'test.tex', 'Math Extension Testing', 'Sphinx', 'report')] ('index', 'test.tex', 'Math Extension Testing', 'Sphinx', 'report')
]

View File

@ -1,4 +1,3 @@
master_doc = 'index'
latex_documents = [ latex_documents = [
(master_doc, 'test.tex', 'Math Extension Testing', 'Sphinx', 'report')] ('index', 'test.tex', 'Math Extension Testing', 'Sphinx', 'report')
]

View File

@ -1,7 +1,6 @@
extensions = ['sphinx.ext.todo'] extensions = ['sphinx.ext.todo']
master_doc = 'index'
latex_documents = [ latex_documents = [
(master_doc, 'TodoTests.tex', 'Todo Tests Documentation', ('index', 'TodoTests.tex', 'Todo Tests Documentation',
'Robin Banks', 'manual'), 'Robin Banks', 'manual'),
] ]

View File

@ -1,4 +1,3 @@
extensions = ['sphinx.ext.viewcode'] extensions = ['sphinx.ext.viewcode']
master_doc = 'index'
exclude_patterns = ['_build'] exclude_patterns = ['_build']
viewcode_follow_imported_members = False viewcode_follow_imported_members = False

View File

@ -5,7 +5,6 @@ source_dir = os.path.abspath('.')
if source_dir not in sys.path: if source_dir not in sys.path:
sys.path.insert(0, source_dir) sys.path.insert(0, source_dir)
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode'] extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode']
master_doc = 'index'
exclude_patterns = ['_build'] exclude_patterns = ['_build']

View File

@ -1,3 +1,2 @@
master_doc = 'index'
html_theme = 'classic' html_theme = 'classic'
exclude_patterns = ['_build'] exclude_patterns = ['_build']

View File

@ -1,5 +1,3 @@
master_doc = 'index'
latex_documents = [ 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')
] ]

View File

@ -1,4 +1,3 @@
master_doc = 'index'
project = 'Sphinx' project = 'Sphinx'
version = '1.4.4' version = '1.4.4'

View File

@ -1,3 +1,2 @@
master_doc = 'index'
html_theme = 'classic' html_theme = 'classic'
exclude_patterns = ['_build'] exclude_patterns = ['_build']

View File

@ -1,4 +1,3 @@
master_doc = 'index'
exclude_patterns = ['_build'] exclude_patterns = ['_build']
rst_epilog = ''' rst_epilog = '''

View File

@ -1,4 +1,3 @@
master_doc = 'index'
exclude_patterns = ['_build'] exclude_patterns = ['_build']
rst_epilog = ''' rst_epilog = '''

View File

@ -1 +0,0 @@
master_doc = 'index'

View File

@ -1,2 +1 @@
master_doc = 'index'
keep_warnings = True keep_warnings = True

View File

@ -1,4 +1,3 @@
master_doc = 'index'
numfig_format = { numfig_format = {
'figure': 'Fig. %s', 'figure': 'Fig. %s',
'table': 'Table. %s', 'table': 'Table. %s',

View File

@ -1 +0,0 @@
master_doc = 'index'

View File

@ -1,5 +1,3 @@
master_doc = 'index'
latex_documents = [ 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')
] ]

View File

@ -1,5 +1,3 @@
master_doc = 'index'
extensions = ['sphinx.ext.imgmath'] # for math_numfig extensions = ['sphinx.ext.imgmath'] # for math_numfig
latex_documents = [ latex_documents = [

View File

@ -1,5 +1,3 @@
master_doc = 'index'
latex_documents = [ 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')
] ]

View File

@ -1,6 +1,4 @@
master_doc = 'index'
# set empty string to the third column to use the first section title to document title # set empty string to the third column to use the first section title to document title
latex_documents = [ latex_documents = [
(master_doc, 'test.tex', '', 'Sphinx', 'report') ('index', 'test.tex', '', 'Sphinx', 'report')
] ]

View File

@ -1,3 +1,2 @@
master_doc = 'index'
html_theme = 'classic' html_theme = 'classic'
exclude_patterns = ['_build'] exclude_patterns = ['_build']

View File

@ -1,5 +1,3 @@
master_doc = 'index'
latex_documents = [ 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')
] ]

View File

@ -1,5 +1,3 @@
master_doc = 'index'
latex_documents = [ 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')
] ]

View File

@ -1,4 +1,3 @@
master_doc = 'index'
html_theme = 'classic' html_theme = 'classic'
exclude_patterns = ['_build'] exclude_patterns = ['_build']

View File

@ -1 +0,0 @@
master_doc = 'index'

View File

@ -1,3 +1,2 @@
master_doc = 'index'
project = 'need <b>"escaped"</b> project' project = 'need <b>"escaped"</b> project'
smartquotes = False smartquotes = False

View File

@ -1,5 +1,3 @@
master_doc = 'index'
latex_documents = [ 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')
] ]

View File

@ -1,3 +1,2 @@
master_doc = 'index'
html_theme = 'classic' html_theme = 'classic'
exclude_patterns = ['_build'] exclude_patterns = ['_build']

View File

@ -3,7 +3,6 @@ import sys
sys.path.insert(0, os.path.abspath('.')) sys.path.insert(0, os.path.abspath('.'))
master_doc = 'index'
extensions = ['prolog_markdown_parser'] extensions = ['prolog_markdown_parser']
rst_prolog = '*Hello world*.\n\n' rst_prolog = '*Hello world*.\n\n'

View File

@ -2,5 +2,4 @@ import os
import sys import sys
sys.path.insert(0, os.path.abspath('sample-0.0.0-py3.7.egg')) sys.path.insert(0, os.path.abspath('sample-0.0.0-py3.7.egg'))
master_doc = 'index'
extensions = ['sphinx.ext.autodoc'] extensions = ['sphinx.ext.autodoc']

View File

@ -1,6 +1,5 @@
master_doc = 'index'
html_compact_lists = False html_compact_lists = False
latex_documents = [ 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')
] ]

View File

@ -1,5 +1,3 @@
master_doc = 'index'
latex_documents = [ 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')
] ]

View File

@ -1,3 +1,2 @@
master_doc = 'index'
exclude_patterns = ['_build'] exclude_patterns = ['_build']
html_search_language = 'en' html_search_language = 'en'

View File

@ -1,5 +1,3 @@
master_doc = 'index'
latex_documents = [ 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')
] ]

View File

@ -1,4 +1,3 @@
master_doc = 'index'
html_theme = 'classic' html_theme = 'classic'
templates_path = ['_templates'] templates_path = ['_templates']

View File

@ -1,4 +1,3 @@
html_theme = 'test-theme' html_theme = 'test-theme'
html_theme_path = ['.', 'test_theme'] html_theme_path = ['.', 'test_theme']
master_doc = 'index'
exclude_patterns = ['_build'] exclude_patterns = ['_build']

View File

@ -1,3 +1,2 @@
master_doc = 'index'
html_theme = 'classic' html_theme = 'classic'
exclude_patterns = ['_build'] exclude_patterns = ['_build']

View File

@ -1,4 +1,3 @@
master_doc = 'index'
html_theme = 'classic' html_theme = 'classic'
exclude_patterns = ['_build'] exclude_patterns = ['_build']
templates_path = ['_templates'] templates_path = ['_templates']

View File

@ -1,3 +1,2 @@
master_doc = 'index'
html_theme = 'classic' html_theme = 'classic'
exclude_patterns = ['_build'] exclude_patterns = ['_build']

View File

@ -1,3 +1,2 @@
master_doc = 'index'
html_theme = 'classic' html_theme = 'classic'
exclude_patterns = ['_build'] exclude_patterns = ['_build']

View File

@ -1,5 +1,3 @@
master_doc = 'index'
latex_documents = [ 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')
] ]

View File

@ -1,7 +1,5 @@
master_doc = 'index'
extensions = ['sphinx.ext.doctest'] extensions = ['sphinx.ext.doctest']
latex_documents = [ 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')
] ]

View File

@ -1,4 +1,3 @@
project = 'versioning test root' project = 'versioning test root'
master_doc = 'index'
source_suffix = '.txt' source_suffix = '.txt'
exclude_patterns = ['_build'] exclude_patterns = ['_build']

View File

@ -2,9 +2,8 @@ import os
import sys import sys
sys.path.append(os.path.abspath('.')) sys.path.append(os.path.abspath('.'))
master_doc = 'index'
extensions = ['sphinx.ext.autodoc'] extensions = ['sphinx.ext.autodoc']
latex_documents = [ latex_documents = [
(master_doc, 'test.tex', 'test-warnings', 'Sphinx', 'report') ('index', 'test.tex', 'test-warnings', 'Sphinx', 'report')
] ]

View File

@ -73,12 +73,12 @@ def test_build_all(requests_head, make_app, nonascii_srcdir, buildername):
def test_master_doc_not_found(tempdir, make_app): 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'] assert tempdir.listdir() == ['conf.py']
app = make_app('dummy', srcdir=tempdir) app = make_app('dummy', srcdir=tempdir)
with pytest.raises(SphinxError): with pytest.raises(SphinxError):
app.builder.build_all() app.builder.build_all() # no index.rst
@pytest.mark.sphinx(buildername='text', testroot='circular') @pytest.mark.sphinx(buildername='text', testroot='circular')

View File

@ -31,8 +31,7 @@ def test_all(app, status, warning):
def test_default_man_pages(): def test_default_man_pages():
config = Config({'master_doc': 'index', config = Config({'project': 'STASI™ Documentation',
'project': 'STASI™ Documentation',
'author': "Wolfgang Schäuble & G'Beckstein", 'author': "Wolfgang Schäuble & G'Beckstein",
'release': '1.0'}) 'release': '1.0'})
config.init_values() config.init_values()

View File

@ -93,8 +93,7 @@ def test_texinfo_citation(app, status, warning):
def test_default_texinfo_documents(): def test_default_texinfo_documents():
config = Config({'master_doc': 'index', config = Config({'project': 'STASI™ Documentation',
'project': 'STASI™ Documentation',
'author': "Wolfgang Schäuble & G'Beckstein"}) 'author': "Wolfgang Schäuble & G'Beckstein"})
config.init_values() config.init_values()
expected = [('index', 'stasi', 'STASI™ Documentation', expected = [('index', 'stasi', 'STASI™ Documentation',