Previously Marius Gedminas wrote:
> - Unit tests: there are many of those, they're independent (thus a
> single .txt for a collection of tests is a Bad Idea), they're short
> (so understanding and debugging is easy) and expressive. I put
> those into .py files full with functions that look like
> def doctest_FooClass_does_this():
> """Test that FooClass is able to ...
> >>> foo = FooClass()
> >>> results = foo.do_this()
> >>> for fruit, score, comments in results:
> ... print fruit.ljust(10), '|', score.ljust(5), '|',
> Orange | 9 | Tastes good, a bit sour
> Apple | 8 | Varies
> and have a traditional test_suite() function at the end that returns
> a DocTestSuite with the appropriate setUp/tearDown/optionflags.
Until you have to step through the test with pdb, at which point it
becomes very painful.
Wichert Akkerman <[EMAIL PROTECTED]> It is simple to make things.
http://www.wiggy.net/ It is hard to make things simple.
Zope3-dev mailing list