mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Added insertion of todo_include_todos config option.
Set to True when we enable 'ext_todo' during the quickstart process.
This commit is contained in:
parent
097c1be57a
commit
9302231342
@ -363,6 +363,7 @@ Note: By default this script will not overwrite already created files.""")
|
||||
epub = True,
|
||||
ext_autodoc = True,
|
||||
ext_viewcode = True,
|
||||
ext_todo = True,
|
||||
makefile = True,
|
||||
batchfile = True,
|
||||
mastertocmaxdepth = opts.maxdepth,
|
||||
|
@ -53,6 +53,7 @@ DEFAULT_VALUE = {
|
||||
'epub': False,
|
||||
'ext_autodoc': False,
|
||||
'ext_doctest': False,
|
||||
'ext_todo': False,
|
||||
'makefile': True,
|
||||
'batchfile': True,
|
||||
}
|
||||
@ -167,6 +168,9 @@ pygments_style = 'sphinx'
|
||||
# If true, keep warnings as "system message" paragraphs in the built documents.
|
||||
#keep_warnings = False
|
||||
|
||||
# If true, `todo` and `todoList` produce output, else they produce nothing.
|
||||
todo_include_todos = %(ext_todo)s
|
||||
|
||||
|
||||
# -- Options for HTML output ----------------------------------------------
|
||||
|
||||
@ -1284,6 +1288,8 @@ def generate(d, overwrite=True, silent=False):
|
||||
d['extensions'] = '\n' + indent + extensions + ',\n'
|
||||
else:
|
||||
d['extensions'] = extensions
|
||||
print(d['extensions'])
|
||||
d['ext_todo'] = text_type(d['ext_todo'])
|
||||
d['copyright'] = time.strftime('%Y') + ', ' + d['author']
|
||||
d['author_texescaped'] = text_type(d['author']).\
|
||||
translate(texescape.tex_escape_map)
|
||||
|
@ -150,6 +150,7 @@ def test_quickstart_defaults(tempdir):
|
||||
assert ns['copyright'] == '%s, Georg Brandl' % time.strftime('%Y')
|
||||
assert ns['version'] == '0.1'
|
||||
assert ns['release'] == '0.1'
|
||||
assert ns['todo_include_todos'] is False
|
||||
assert ns['html_static_path'] == ['_static']
|
||||
assert ns['latex_documents'] == [
|
||||
('index', 'SphinxTest.tex', 'Sphinx Test Documentation',
|
||||
@ -178,7 +179,7 @@ def test_quickstart_all_answers(tempdir):
|
||||
'autodoc': 'y',
|
||||
'doctest': 'yes',
|
||||
'intersphinx': 'no',
|
||||
'todo': 'n',
|
||||
'todo': 'y',
|
||||
'coverage': 'no',
|
||||
'pngmath': 'N',
|
||||
'mathjax': 'no',
|
||||
@ -198,7 +199,9 @@ def test_quickstart_all_answers(tempdir):
|
||||
assert conffile.isfile()
|
||||
ns = {}
|
||||
execfile_(conffile, ns)
|
||||
assert ns['extensions'] == ['sphinx.ext.autodoc', 'sphinx.ext.doctest']
|
||||
assert ns['extensions'] == [
|
||||
'sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.todo'
|
||||
]
|
||||
assert ns['templates_path'] == ['.templates']
|
||||
assert ns['source_suffix'] == '.txt'
|
||||
assert ns['master_doc'] == 'contents'
|
||||
@ -207,6 +210,7 @@ def test_quickstart_all_answers(tempdir):
|
||||
time.strftime('%Y')
|
||||
assert ns['version'] == '2.0'
|
||||
assert ns['release'] == '2.0.1'
|
||||
assert ns['todo_include_todos'] is True
|
||||
assert ns['html_static_path'] == ['.static']
|
||||
assert ns['latex_documents'] == [
|
||||
('contents', 'STASI.tex', u'STASI™ Documentation',
|
||||
|
Loading…
Reference in New Issue
Block a user