On 11 Nov., 15:12, Ontje Lünsdorf <[email protected]> wrote:
> Hi Georg,
>
> Am Mittwoch 11 November 2009 10:47:27 schrieb Georg Brandl:> Are you aware of 
> the existing doctest extension (if not, see
> >http://sphinx.pocoo.org/ext/doctest.html)? It already does something
> >  similar; but not as sophisticated.  It is more oriented towards making
> >  sure that the examples you give in the documentation don't stop working.
>
> Yes, in fact I've used it extensively before. It's very nice but there were at
> least two drawbacks which I tried to circumvent with sphinxtest:
>
> Doctests in a documentation file are run as a singular test. But you often 
> want
> to test your code in different use-cases which you don't want to scatter over
> multiple files. If all tests are run in a singular environment it may get 
> messy
> to find the root cause of a failure.
>
> The sphinx doctest builder is difficult to integrate into other utilities like
> continuous testing frameworks (these usually expect unittests).
>
> I will experiment a bit more with doctest blocks and see if I can get
> comfortable with those :)

I'm not saying you have to use the doctest extension :) As I said,
it's not a
serious unittesting tool, but to make sure that snippets continue to
work.
(In docs, you often use objects created earlier in later snippets, so
the shared
environment makes sense.)  I just wanted to make sure you know that it
exists.

What you're developing looks very interesting, because it could at one
point
combine documentation and tests -- kind of "literate testing" :)

Georg
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to