django-rest-framework/docs/check_sphinx.py
2011-12-15 12:25:56 +01:00

17 lines
493 B
Python

import pytest
import subprocess
def test_linkcheck(tmpdir):
doctrees = tmpdir.join("doctrees")
htmldir = tmpdir.join("html")
subprocess.check_call(
["sphinx-build", "-q", "-blinkcheck",
"-d", str(doctrees), ".", str(htmldir)])
def test_build_docs(tmpdir):
doctrees = tmpdir.join("doctrees")
htmldir = "html" #we want to keep the docs
subprocess.check_call([
"sphinx-build", "-q", "-bhtml",
"-d", str(doctrees), ".", str(htmldir)])