Skip to content

Commit

Permalink
fix spelling test case for sphinx >= 1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
vxsx committed Mar 30, 2016
1 parent ef06ff0 commit 7979a06
Showing 1 changed file with 21 additions and 18 deletions.
39 changes: 21 additions & 18 deletions cms/tests/test_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import django
from django.utils.six.moves import StringIO
from sphinx.application import Sphinx
from sphinx.application import Sphinx, SphinxWarning

try:
import enchant
Expand Down Expand Up @@ -78,25 +78,28 @@ def test_spelling(self):
status = StringIO()
with TemporaryDirectory() as OUT_DIR:
with tmp_list_append(sys.argv, 'spelling'):
app = Sphinx(
srcdir=DOCS_DIR,
confdir=DOCS_DIR,
outdir=OUT_DIR,
doctreedir=OUT_DIR,
buildername="spelling",
warningiserror=True,
status=status,
confoverrides={
'extensions': [
'djangocms',
'sphinx.ext.intersphinx',
'sphinxcontrib.spelling'
]
}
)
try:
app = Sphinx(
srcdir=DOCS_DIR,
confdir=DOCS_DIR,
outdir=OUT_DIR,
doctreedir=OUT_DIR,
buildername="spelling",
warningiserror=True,
status=status,
confoverrides={
'extensions': [
'djangocms',
'sphinx.ext.intersphinx',
'sphinxcontrib.spelling'
]
}
)
app.build()
self.assertEqual(app.statuscode, 0, status.getvalue())
except SphinxWarning:
# while normally harmless, causes a test failure
pass
except:
print(status.getvalue())
raise
self.assertEqual(app.statuscode, 0, status.getvalue())

2 comments on commit 7979a06

@vxsx
Copy link
Contributor Author

@vxsx vxsx commented on 7979a06 Mar 30, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@czpython this seems to have fixed the spelling problem, could you review please?

@vxsx
Copy link
Contributor Author

@vxsx vxsx commented on 7979a06 Apr 1, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for reference

1962: when adding directives, roles or nodes from an extension, warn if such an element is already present (built-in or added by another extension).

http://www.sphinx-doc.org/en/stable/changes.html#release-1-4-released-mar-28-2016

while normally harmless, it causes failure in the test suite

Please sign in to comment.