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

2017-09-20 Thread Skip Montanaro
> I didn't mean, "Can you name your Markdown files with an .rst extension," I
> meant, "Can you use ReST instead of Markdown?"

I wondered if maybe I was misinterpreting your question. :-)

Conceptually, yes, I could use ReST. I'm just trying to go with the
flow here at work. Markdown seems to be the agreed upon way to write
plain text documentation.

Skip
-- 
https://mail.python.org/mailman/listinfo/python-list


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

2017-09-20 Thread Skip Montanaro
> Actually, I semi-lied. It seems to pick up the second of two examples,
> and gets a bit confused about leading whitespace. I think I need to do
> some more fiddling.

Solved the whitespace issue with the +NORMALIZE_WHITESPACE flag. It
turns out that it actually does run all examples in the document. They
are just concatenated into one big "test".

Skip
-- 
https://mail.python.org/mailman/listinfo/python-list


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

2017-09-20 Thread Ned Batchelder

On 9/20/17 11:17 AM, Skip Montanaro wrote:

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

Given the existence proof of md working as an extension (see my
previous follow-up), my guess is that it more-or-less supports just
about any nearly-plain-text format. I could use .rst, I suppose, but
then I'd have to add a magic token to my files to tell Emacs they are
really in Markdown format.



I didn't mean, "Can you name your Markdown files with an .rst 
extension," I meant, "Can you use ReST instead of Markdown?"


--Ned.
--
https://mail.python.org/mailman/listinfo/python-list


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

2017-09-20 Thread Skip Montanaro
Actually, I semi-lied. It seems to pick up the second of two examples,
and gets a bit confused about leading whitespace. I think I need to do
some more fiddling.

S
-- 
https://mail.python.org/mailman/listinfo/python-list


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

2017-09-20 Thread Skip Montanaro
> There are tools for getting doctests out of .rst files.  Is it an option to
> use .rst instead of .md?

Given the existence proof of md working as an extension (see my
previous follow-up), my guess is that it more-or-less supports just
about any nearly-plain-text format. I could use .rst, I suppose, but
then I'd have to add a magic token to my files to tell Emacs they are
really in Markdown format.

Skip
-- 
https://mail.python.org/mailman/listinfo/python-list


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

2017-09-20 Thread Skip Montanaro
> 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 ...

I believe I figured this out. It appears to be sufficient to add

doctest-extension=md

to my noserc file.

Camping happy, am I,

Skip
-- 
https://mail.python.org/mailman/listinfo/python-list


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

2017-09-20 Thread Ned Batchelder

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.
--
https://mail.python.org/mailman/listinfo/python-list


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

2017-09-20 Thread Skip Montanaro
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
-- 
https://mail.python.org/mailman/listinfo/python-list