[Zope-dev] patterns for using sphinx with the Zope Toolkit?

Lennart Regebro regebro at gmail.com
Sun Jan 3 06:38:23 EST 2010


On Sun, Jan 3, 2010 at 02:44, Chris McDonough <chrism at plope.com> wrote:
>  But I couldn't really figure out a way to do the moral equivalent of this:
>
> .. code-block:: python
>
>    a == 1
>
> .. manuel-expect:
>
>    True
>
> Maybe I missed it.

I couldn't either. So I added a sphinx module for Manuel, supporting
Sphinx testsetup/testcode/testoutput statements.

Missing so far is:
  - support for groups,
  - in particular the * group for testsetup,
  - support for having doctest statements mixed with the above, so you
can have >>> statements but put output in a testoutput statement,

If the code is acceptable to Manuel people, I'll might work on it some
more until my usecases work. :) On the other hand I might abandon this
path completely, and make all my testing *not* be doctests, but use
Sphinx literal-include instead, and run the tests some other way,
because as usual doctests are turning out the be a shitload of work
for very little benefit.

Also if the above code is deemed as being a Good Idea, I will remove
all the usage of zope.testing.doctest from Manuel. This is necessary,
as one of the things I need from Manuel is a Python 3 port, and I'm
not porting zope.testing.doctest to Python 3.
-- 
Lennart Regebro: Python, Zope, Plone, Grok
http://regebro.wordpress.com/
+33 661 58 14 64


More information about the Zope-Dev mailing list