Re: [Zope-dev] Why I dislike narrative doctests

2008-04-25 Thread Lennart Regebro
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

Re: [Zope-dev] Why I dislike narrative doctests

2008-04-25 Thread Christian Theune
On Thu, Apr 24, 2008 at 04:07:12PM -0400, Jim Fulton 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

Re: [Zope-dev] Why I dislike narrative doctests

2008-04-25 Thread Jim Fulton
On Apr 25, 2008, at 1:59 AM, 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

Re: [Zope-dev] Why I dislike narrative doctests

2008-04-25 Thread Kent Tenney
On Thu, Apr 24, 2008 at 3:07 PM, Jim Fulton [EMAIL PROTECTED] wrote: On Apr 24, 2008, at 1:12 AM, Christian Theune wrote: Hi, On Wed, Apr 23, 2008 at 04:47:59PM -0400, Jim Fulton wrote: On Apr 23, 2008, at 4:47 PM, Marius Gedminas wrote: ... The point of my message was

Re: [Zope-dev] Why I dislike narrative doctests

2008-04-25 Thread Jim Fulton
On Apr 25, 2008, at 10:20 AM, Kent Tenney wrote: However, as Sphinx lowers the barrier to cross-referencing, Sounds like I need to check that out. :) they will become important as link destinations from 'real' documentation. Maaaybe. I like doctests for readability even if they aren't

Re: [Zope-dev] Why I dislike narrative doctests

2008-04-25 Thread Stephan Richter
On Friday 25 April 2008, Jim Fulton wrote: However, as Sphinx lowers the barrier to cross-referencing, Sounds like I need to check that out. :) Paul just diud that work the last two days for z3c.form: http://docs.carduner.net/z3c.form/ Regards, Stephan -- Stephan Richter Web Software

Re: [Zope-dev] Why I dislike narrative doctests

2008-04-25 Thread Kent Tenney
On Fri, Apr 25, 2008 at 9:39 AM, Jim Fulton [EMAIL PROTECTED] wrote: On Apr 25, 2008, at 10:20 AM, Kent Tenney wrote: However, as Sphinx lowers the barrier to cross-referencing, Sounds like I need to check that out. :) they will become important as link destinations from 'real'

Re: [Zope-dev] Why I dislike narrative doctests

2008-04-25 Thread Kent Tenney
On Fri, Apr 25, 2008 at 10:11 AM, Kent Tenney [EMAIL PROTECTED] wrote: On Fri, Apr 25, 2008 at 9:39 AM, Jim Fulton [EMAIL PROTECTED] wrote: On Apr 25, 2008, at 10:20 AM, Kent Tenney wrote: However, as Sphinx lowers the barrier to cross-referencing, Sounds like I need to

Re: [Zope-dev] Why I dislike narrative doctests

2008-04-25 Thread Jim Fulton
On Apr 25, 2008, at 11:22 AM, Stephan Richter wrote: - 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. Why is this not documentation?

Re: [Zope-dev] Why I dislike narrative doctests

2008-04-24 Thread Jim Fulton
On Apr 24, 2008, at 1:12 AM, Christian Theune wrote: Hi, On Wed, Apr 23, 2008 at 04:47:59PM -0400, Jim Fulton wrote: On Apr 23, 2008, at 4:47 PM, Marius Gedminas wrote: ... The point of my message was not to whine about the state of zope.testing, but to present a new argument against

[Zope-dev] Why I dislike narrative doctests

2008-04-23 Thread Marius Gedminas
Suppose I find a bug (say, zope.testing.testrunner.StartUpFailure objects make unittest.TextTestRunner cry). Being a good developer I want to start the bug fix with a unit test. Now if zope.testing used old-style isolated unit tests, I could open the tests.py (or tests/test_testrunner.py) in a

Re: [Zope-dev] Why I dislike narrative doctests

2008-04-23 Thread Sidnei da Silva
Can't you start a plain-old unittests module and stick your test in there? Is there any rule that says you cannot create a plain-old test module if the project you are fixing the bug in uses doctests? On Wed, Apr 23, 2008 at 5:19 PM, Marius Gedminas [EMAIL PROTECTED] wrote: Suppose I find a bug

Re: [Zope-dev] Why I dislike narrative doctests

2008-04-23 Thread Jim Fulton
On Apr 23, 2008, at 4:19 PM, Marius Gedminas wrote: Suppose I find a bug (say, zope.testing.testrunner.StartUpFailure objects make unittest.TextTestRunner cry). Being a good developer I want to start the bug fix with a unit test. Now if zope.testing used old-style isolated unit tests, I

Re: [Zope-dev] Why I dislike narrative doctests

2008-04-23 Thread Marius Gedminas
On Wed, Apr 23, 2008 at 05:22:29PM -0300, Sidnei da Silva wrote: Can't you start a plain-old unittests module and stick your test in there? Is there any rule that says you cannot create a plain-old test module if the project you are fixing the bug in uses doctests? I'll probably do that (since

Re: [Zope-dev] Why I dislike narrative doctests

2008-04-23 Thread Lennart Regebro
On Wed, Apr 23, 2008 at 10:19 PM, Marius Gedminas [EMAIL PROTECTED] wrote: Suppose I find a bug (say, zope.testing.testrunner.StartUpFailure objects make unittest.TextTestRunner cry). Being a good developer I want to start the bug fix with a unit test. ... I still maintain that: *

Re: [Zope-dev] Why I dislike narrative doctests

2008-04-23 Thread Christian Theune
Hi, On Wed, Apr 23, 2008 at 04:47:59PM -0400, Jim Fulton wrote: On Apr 23, 2008, at 4:47 PM, Marius Gedminas wrote: ... The point of my message was not to whine about the state of zope.testing, but to present a new argument against the current fashion of using plain-text narrative doctests