[TIP] Python Testing book review

Jim Fulton jim at zope.com
Sun Mar 7 06:10:53 PST 2010


On Sat, Mar 6, 2010 at 2:25 PM, Tarek Ziadé <ziade.tarek at gmail.com> wrote:
...
> I've done that with my latest book for most examples, but you cannot
> have a fully-covered book because some code snippets cannot be
> doctests. You would need to write test fixtures that would be longer
> than the book itself to have a good test coverage because a book is
> simply not an application.

Can you give one or two examples of what you're thinking of when you
say "some code snippets cannot be doctests"?

Did you try using manuel, http://packages.python.org/manuel/?  I've
found many code examples that don't fit the doctest python-prompt
style, either because they are module source, or because they aren't
even Python. I'm very happy with how the bobo dcumentation,
http://bobo.digicool.com/, turned out with manuel's help. Almost all
of the bobo examples are tested even though none are in the
traditional doctest style.

Jim

--
Jim Fulton



More information about the testing-in-python mailing list