aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDonald Stufft <donald@stufft.io>2013-08-11 17:47:17 -0400
committerDonald Stufft <donald@stufft.io>2013-08-11 17:54:13 -0400
commit235fa7199deeb6fab4412fe29a9520c9d5d8d361 (patch)
tree873044cbe01ecd4d0893157b5735d7223c22af50
parent09f53578923c241fbb76c0be6bdf725f3b96f528 (diff)
downloadcryptography-235fa7199deeb6fab4412fe29a9520c9d5d8d361.tar.gz
cryptography-235fa7199deeb6fab4412fe29a9520c9d5d8d361.tar.bz2
cryptography-235fa7199deeb6fab4412fe29a9520c9d5d8d361.zip
Use the Sphinx doctest builder
This allows us to test our documentation snippets using the standard "doctest" utility.
-rw-r--r--docs/conf.py1
-rw-r--r--tox.ini5
2 files changed, 4 insertions, 2 deletions
diff --git a/docs/conf.py b/docs/conf.py
index bd8642c5..16b1109e 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -25,6 +25,7 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = [
'sphinx.ext.autodoc',
+ 'sphinx.ext.doctest',
'sphinx.ext.intersphinx',
'sphinx.ext.viewcode',
]
diff --git a/tox.ini b/tox.ini
index 81c66758..2f4c2637 100644
--- a/tox.ini
+++ b/tox.ini
@@ -8,8 +8,9 @@ commands = py.test --cov=cryptography/ --cov=tests/
[testenv:docs]
deps = sphinx
basepython = python2.7
-changedir = docs
-commands = sphinx-build -W -b html -d {envtmpdir}/doctrees . _build/html
+commands =
+ sphinx-build -W -b html -d {envtmpdir}/doctrees docs docs/_build/html
+ sphinx-build -W -b doctest -d {envtmpdir}/doctrees docs docs/_build/html
[testenv:pep8]
deps = flake8