-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Description
As highlighted by the PR #503, we miss a unittest for the documentation.
I created a new branch and initiated a commit: 8c95be to address this issue.
I'm not used to Sphinx, so if anyone wanna help on this contributions are welcome.
The main idea is to insure that we cannot merge PR that break the documentation as I unfortunately did in #502.
I thought about using this snippet:
https://stackoverflow.com/questions/33896196/how-to-test-the-validity-of-your-sphinx-documentation
class DocTest(unittest.TestCase):
source_dir = u'docs/source'
config_dir = u'docs/source'
output_dir = u'docs/build'
doctree_dir = u'docs/build/doctrees'
all_files = 1
def test_html_documentation(self):
app = Sphinx(self.source_dir,
self.config_dir,
self.output_dir,
self.doctree_dir,
buildername='html',
warningiserror=True,
)
app.build(force_all=self.all_files)
# TODO: additional checks here if needed
def test_text_documentation(self):
# The same, but with different buildername
app = Sphinx(self.source_dir,
self.config_dir,
self.output_dir,
self.doctree_dir,
buildername='text',
warningiserror=True,
)
app.build(force_all=self.all_files)
# TODO: additional checks if needed
def tearDown(self):
# TODO: clean up the output directory
pass