Added an `only` directive that can selectively include text

based on enabled "tags".  Tags can be given on the command
line.  Also, the current builder output format (e.g. "html" or
"latex") is always a defined tag.
This commit is contained in:
Georg Brandl
2009-02-19 21:56:34 +01:00
parent 8e4ef0d585
commit 4c81b055c8
20 changed files with 242 additions and 27 deletions
+6 -3
View File
@@ -99,8 +99,9 @@ class TestApp(application.Sphinx):
def __init__(self, srcdir=None, confdir=None, outdir=None, doctreedir=None,
buildername='html', confoverrides=None,
status=None, warning=None,
freshenv=None, confname='conf.py', cleanenv=False):
status=None, warning=None, freshenv=None,
warningiserror=None, tags=None,
confname='conf.py', cleanenv=False):
application.CONFIG_FILENAME = confname
@@ -136,10 +137,12 @@ class TestApp(application.Sphinx):
warning = ListOutput('stderr')
if freshenv is None:
freshenv = False
if warningiserror is None:
warningiserror = False
application.Sphinx.__init__(self, srcdir, confdir, outdir, doctreedir,
buildername, confoverrides, status, warning,
freshenv)
freshenv, warningiserror, tags)
def cleanup(self, doctrees=False):
AutoDirective._registry.clear()