summaryrefslogtreecommitdiff
path: root/tasks.py
diff options
context:
space:
mode:
Diffstat (limited to 'tasks.py')
-rw-r--r--tasks.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/tasks.py b/tasks.py
index f7df006b..ed0004a6 100644
--- a/tasks.py
+++ b/tasks.py
@@ -45,7 +45,7 @@ namespace.add_collection(namespace_clean, 'clean')
@invoke.task
def pytest(context):
"Run tests and code coverage using pytest"
- context.run("pytest --cov=cmd2 --cov-report=term --cov-report=html")
+ context.run("pytest --cov=cmd2 --cov-report=term --cov-report=html", pty=True)
namespace.add_task(pytest)
@invoke.task
@@ -98,7 +98,7 @@ SPHINX_OPTS = '-nvWT' # Be nitpicky, verbose, and treat warnings as errors
def docs(context, builder='html'):
"Build documentation using sphinx"
cmdline = 'python -msphinx -M {} {} {} {}'.format(builder, DOCS_SRCDIR, DOCS_BUILDDIR, SPHINX_OPTS)
- context.run(cmdline)
+ context.run(cmdline, pty=True)
namespace.add_task(docs)
@invoke.task()
@@ -114,6 +114,12 @@ def docs_clean(context):
rmrf(DOCS_BUILDDIR)
namespace_clean.add_task(docs_clean, name='docs')
+@invoke.task()
+def linkcheck(context):
+ """Check external links in Sphinx documentation for integrity."""
+ context.run('cd docs && make linkcheck', pty=True)
+namespace.add_task(linkcheck)
+
@invoke.task
def livehtml(context):
"Launch webserver on http://localhost:8000 with rendered documentation"