Add `--extensions to sphinx-quickstart` to support enable arbitary extensions from command line (ref: #2904)

This commit is contained in:
Takeshi KOMIYA
2016-11-02 11:11:15 +09:00
parent a759e5eae7
commit ae1f523d52
4 changed files with 34 additions and 8 deletions

View File

@@ -298,3 +298,16 @@ def test_default_filename(tempdir):
assert ns['latex_documents'][0][1] == 'sphinx.tex'
assert ns['man_pages'][0][1] == 'sphinx'
assert ns['texinfo_documents'][0][1] == 'sphinx'
@with_tempdir
def test_extensions(tempdir):
qs.main(['sphinx-quickstart', '-q',
'-p', 'project_name', '-a', 'author',
'--extensions', 'foo,bar,baz', tempdir])
conffile = tempdir / 'conf.py'
assert conffile.isfile()
ns = {}
execfile_(conffile, ns)
assert ns['extensions'] == ['foo', 'bar', 'baz']