Skip to main content

No project description provided

Project description

shtest tests shell commands in your Sphinx documentation. The shtest directive supports the usual doctest syntax. It offers two options: specifying the expected return code (defaults to 0) and choosing the stream to compare with (defaults to stdout).

Examples

# Obligatory hello world example.
$ echo hello world
hello world
:stream: stderr

# Read from stderr instead of stdout.
$ echo message on stderr >&2
message on stderr
:returncode: 1

# Use a non-zero expected return code.
$ false
# Run multiple tests in one directive.
$ echo hello
hello
$ echo world
world

Installation

Run pip install sphinxcontrib-shtest to install the package and add "sphinxcontrib-shtest" to your extensions list in conf.py (see here for details). Then execute sphinx-build -b shtest /path/to/source/directory /path/to/output/directory.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sphinxcontrib-shtest-0.1.tar.gz (3.7 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page