Fix for Sphinx 1.6

pull/121/head
Ashley Whetter 7 years ago committed by Ashley Whetter
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):

@ -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…
Cancel
Save