Lennart Regebro wrote:
On Thu, Apr 24, 2008 at 10:07 PM, Jim Fulton <[EMAIL PROTECTED]> wrote:
 - If a file is documentation and a test, make sure it is good
documentation. In that case, documentation comes first. Don't add so many
tests that it ruins the documentation.

 - Test edge cases in separate tests.  These are typically short-ish strings
in test modules.

 - A variation is to have a narrative that doesn't try hard to be
documentation.  The narrative can be convenient, up to a point, even in a
test.  These should be clearly marked as not being documentation.

I'รถ happy to here this from an authorative source. I've been saying it
for years, and I have usually been contradicted by people saying "no
all tests should be doctests", Lets kill that sillyness once and for
all now. :-)

I've written such rules down: http://svn.zope.org/Sandbox/philikon/foundation.

If it's missing something, feel free to suggest a patch.
Zope-Dev maillist  -  Zope-Dev@zope.org
**  No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )

Reply via email to