[TIP] TDD and automatic code generation
jim at zope.com
Tue Sep 4 06:53:22 PDT 2007
On Sep 3, 2007, at 3:50 AM, Andreas Dotzler wrote:
> This is about using Zope3 interfaces (or schemas) and doctest to
> develop in
> TDD fashion. I very much liked the article "Zope3 in 30 Minutes
> which is specific about developing a zope3 application, however the
> should hold for any python application.
> So the steps are:
> 1. write the interface IClassName.py
> 2. write the doctest test_ClassName.py
> 3. implement the class ClassName.py and check if it passes the doctest
> Does anyone know a concept, tool, script that does approximately
> what I
> suggest ?
> Any comment or remark highly appreciated.
Generation of test skeletons from interface declarations seems like a
reasonable idea, although I'm not at all sure it's worth the bother.
I don't usage documentation (as opposed to reference documentation)
can be usefully generated from interfaces.
Jim Fulton mailto:jim at zope.com Python Powered!
CTO (540) 361-1714 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org
More information about the testing-in-python