mirror of
https://github.com/readthedocs/sphinx-autoapi
synced 2024-11-10 01:10:27 +00:00
Fix for Sphinx 1.6
This commit is contained in:
parent
316457e9fc
commit
a1a3f05202
@ -135,10 +135,6 @@ def doctree_read(app, doctree):
|
||||
app.info(bold('[AutoAPI] ') +
|
||||
darkgreen('Adding AutoAPI TOCTree [%s] to index.rst' % toc_entry)
|
||||
)
|
||||
if sphinx.version_info >= (1, 5):
|
||||
app.env.toctree.process_doc(app.env.docname, doctree)
|
||||
else:
|
||||
app.env.build_toc_from(app.env.docname, doctree)
|
||||
|
||||
|
||||
def setup(app):
|
||||
|
@ -89,6 +89,15 @@ class PythonTests(LanguageIntegrationTests):
|
||||
self.assertFalse(
|
||||
os.path.exists('_build/text/autoapi/method_multiline')
|
||||
)
|
||||
index_file = open('_build/text/index.txt').read()
|
||||
self.assertIn(
|
||||
'Sphinx AutoAPI Index',
|
||||
index_file
|
||||
)
|
||||
self.assertIn(
|
||||
'Foo',
|
||||
index_file
|
||||
)
|
||||
|
||||
|
||||
class DotNetTests(LanguageIntegrationTests):
|
||||
|
5
tox.ini
5
tox.ini
@ -1,6 +1,6 @@
|
||||
[tox]
|
||||
envlist =
|
||||
py{27,34,35}-sphinx{13,14,15}
|
||||
py{27,34,35}-sphinx{13,14,15,16}
|
||||
lint
|
||||
docs
|
||||
|
||||
@ -12,12 +12,13 @@ deps = -r{toxinidir}/requirements.txt
|
||||
mock
|
||||
sphinx14: Sphinx<1.5
|
||||
sphinx15: Sphinx<1.6
|
||||
sphinx16: Sphinx<1.7
|
||||
commands =
|
||||
py.test {posargs}
|
||||
|
||||
[testenv:docs]
|
||||
deps =
|
||||
Sphinx==1.5
|
||||
Sphinx>=1.6,<=1.7
|
||||
sphinx_rtd_theme
|
||||
changedir = {toxinidir}/docs
|
||||
commands =
|
||||
|
Loading…
Reference in New Issue
Block a user