mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-26 03:23:59 +03:00
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.
This commit is contained in:
parent
8cabab2703
commit
e2b9359a2d
16
docs/check_sphinx.py
Normal file
16
docs/check_sphinx.py
Normal file
|
@ -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)])
|
Loading…
Reference in New Issue
Block a user