How-to

Run a Markdown file

Use the module command with the file path:

$ python -m doctest_docutils README.md

Run a reStructuredText file

Use the same command for .rst files:

$ python -m doctest_docutils README.rst

See collected examples

Pass -v for verbose standard-library doctest output:

$ python -m doctest_docutils README.md -v

Compare with stdlib doctest

Use the stdlib command when you are checking Python modules or plain text that does not need docutils parsing:

$ python -m doctest --help

Use doctest_docutils when the examples live inside Markdown or reStructuredText structure that doctest would otherwise treat as plain text.