From e2b9359a2d903b2010dbf47565f63adebbdbc21b Mon Sep 17 00:00:00 2001 From: Marko Tibold Date: Thu, 15 Dec 2011 00:27:29 +0100 Subject: [PATCH] Adding a docs env to the tox project. This will run the linkcheck and build the html docs, turning any warnings into errors. Also changed the theme to sphinx-doc and added version to be displayed in the docs. --- docs/check_sphinx.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 docs/check_sphinx.py diff --git a/docs/check_sphinx.py b/docs/check_sphinx.py new file mode 100644 index 000000000..c4ce03177 --- /dev/null +++ b/docs/check_sphinx.py @@ -0,0 +1,16 @@ +import pytest +import subprocess + +def test_linkcheck(tmpdir): + doctrees = tmpdir.join("doctrees") + htmldir = tmpdir.join("html") + subprocess.check_call( + ["sphinx-build", "-W", "-blinkcheck", + "-d", str(doctrees), ".", str(htmldir)]) + +def test_build_docs(tmpdir): + doctrees = tmpdir.join("doctrees") + htmldir = tmpdir.join("html") + subprocess.check_call([ + "sphinx-build", "-W", "-bhtml", + "-d", str(doctrees), ".", str(htmldir)])