summaryrefslogtreecommitdiff
path: root/sphinx/quickstart.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-01-22 20:29:38 +0100
committerGeorg Brandl <georg@python.org>2009-01-22 20:29:38 +0100
commit655ae6d89ee2ee353cad6e87c65f8ccb4ba51d94 (patch)
treed65ef84b8b765e74bf55a0a859dc9f35414cf38d /sphinx/quickstart.py
parent0dd23c2dc12144d12264932acbe30d79e03c1ffe (diff)
downloadsphinx-git-655ae6d89ee2ee353cad6e87c65f8ccb4ba51d94.tar.gz
add doctest quickstart target.
Diffstat (limited to 'sphinx/quickstart.py')
-rw-r--r--sphinx/quickstart.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/sphinx/quickstart.py b/sphinx/quickstart.py
index b1e44d385..52bbf7192 100644
--- a/sphinx/quickstart.py
+++ b/sphinx/quickstart.py
@@ -257,7 +257,7 @@ PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d %(rbuilddir)s/doctrees $(PAPEROPT_$(PAPER)) \
$(SPHINXOPTS) %(rsrcdir)s
-.PHONY: help clean html pickle json htmlhelp qthelp latex changes linkcheck
+.PHONY: help clean html pickle json htmlhelp qthelp latex changes linkcheck doctest
help:
\t@echo "Please use \\`make <target>' where <target> is one of"
@@ -269,6 +269,7 @@ help:
\t@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
\t@echo " changes to make an overview over all changed/added/deprecated items"
\t@echo " linkcheck to check all external links for integrity"
+\t@echo " doctest to run all doctests embedded in the documentation (if enabled)"
clean:
\t-rm -rf %(rbuilddir)s/*
@@ -320,6 +321,11 @@ linkcheck:
\t@echo
\t@echo "Link check complete; look for any errors in the above output " \\
\t "or in %(rbuilddir)s/linkcheck/output.txt."
+
+doctest:
+\t$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) %(rbuilddir)s/doctest
+\t@echo "Testing of doctests in the sources finished, look at the " \\
+\t "results in %(rbuilddir)s/doctest/output.txt."
'''
BATCHFILE = '''\
@@ -346,6 +352,7 @@ if "%%1" == "help" (
\techo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
\techo. changes to make an overview over all changed/added/deprecated items
\techo. linkcheck to check all external links for integrity
+\techo. doctest to run all doctests embedded in the documentation (if enabled)
\tgoto end
)
@@ -417,6 +424,14 @@ or in %(rbuilddir)s/linkcheck/output.txt.
\tgoto end
)
+if "%%1" == "doctest" (
+\t%%SPHINXBUILD%% -b doctest %%ALLSPHINXOPTS%% %(rbuilddir)s/doctest
+\techo.
+\techo.Testing of doctests in the sources finished, look at the ^
+results in %(rbuilddir)s/doctest/output.txt.
+\tgoto end
+)
+
:end
'''