diff options
| author | Marko Tibold | 2011-12-15 00:27:29 +0100 |
|---|---|---|
| committer | Marko Tibold | 2011-12-15 00:27:29 +0100 |
| commit | e2b9359a2d903b2010dbf47565f63adebbdbc21b (patch) | |
| tree | 64f8a929eea5bc3f339f6a1b0527bcbf4c730970 /docs/check_sphinx.py | |
| parent | 8cabab2703be3a2e21e79b945659a7b14df89e71 (diff) | |
| download | django-rest-framework-e2b9359a2d903b2010dbf47565f63adebbdbc21b.tar.bz2 | |
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.
Diffstat (limited to 'docs/check_sphinx.py')
| -rw-r--r-- | docs/check_sphinx.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/docs/check_sphinx.py b/docs/check_sphinx.py new file mode 100644 index 00000000..c4ce0317 --- /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)]) |
