How to get Nose to run doctests from my Markdown documentation?

Ned Batchelder ned at nedbatchelder.com
Wed Sep 20 10:50:54 EDT 2017


On 9/20/17 10:07 AM, Skip Montanaro wrote:
> I routinely include doctests as a source of test cases in my nose runs, but
> I want to also coax it to check the examples in my Markdown files. Is there
> a way to do this? If I explicitly give a Markdown file on the command line,
> nose complains:
>
> Unable to load tests from file ...
>
> Am I perhaps missing some sort of nose-markdown plugin which would
> magically make this work?
>
> Thx,
>
> Skip

There are tools for getting doctests out of .rst files.  Is it an option 
to use .rst instead of .md?

--Ned.



More information about the Python-list mailing list