Skip to content

Commit

Permalink
FIX for sphinx 1.8.0 dev (#391)
Browse files Browse the repository at this point in the history
  • Loading branch information
larsoner authored and lesteve committed Jun 15, 2018
1 parent ed99ab5 commit f70f0ec
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -41,6 +41,7 @@ htmlcov/
nosetests.xml
coverage.xml
*.orig
.pytest_cache

# Translations
*.mo
Expand Down
8 changes: 7 additions & 1 deletion sphinx_gallery/tests/test_full.py
Expand Up @@ -12,6 +12,7 @@
import shutil

from sphinx.application import Sphinx
from sphinx.util.docutils import docutils_namespace

import pytest

Expand All @@ -31,7 +32,12 @@ def ignore(src, names):
conf_dir = temp_dir
out_dir = op.join(temp_dir, '_build', 'html')
toctrees_dir = op.join(temp_dir, '_build', 'toctrees')
app = Sphinx(src_dir, conf_dir, out_dir, toctrees_dir, buildername='html')
# Avoid warnings about re-registration, see:
# https://github.com/sphinx-doc/sphinx/issues/5038
with docutils_namespace():
app = Sphinx(src_dir, conf_dir, out_dir, toctrees_dir,
buildername='html')

app.build(False, [])
return app

Expand Down

0 comments on commit f70f0ec

Please sign in to comment.