Re: [Zope-dev] Re: zope.sendmail Retry fixes and new state machine.

2008-03-19 Thread Marius Gedminas
On Tue, Mar 11, 2008 at 09:25:59AM -0400, Jim Fulton wrote: > I'm not sure what scaffolding you're referring to. Do you mean test set up? > Or the tools for normalizing output? For test set up, I don't think > there's any difference. I can sympathize with the skepticism with > normalizing outp

Re: [Zope-dev] Re: zope.sendmail Retry fixes and new state machine.

2008-03-19 Thread Marius Gedminas
On Mon, Mar 10, 2008 at 06:09:50PM +0100, Wichert Akkerman wrote: [...the usual doctest vs unittest discussion ...] > Lack of isolation is a very convincing argument to me. For me as well. Which is why I put my doctests into a traditional tests/test_foo.py module like this: # ... imports etc

[Zope-dev] Re: zope.sendmail Retry fixes and new state machine.

2008-03-14 Thread Malthe Borch
Stephan Richter wrote: I am very happy about my tests in z3c.form. They demonstrate tests with different audiences in mind. Rightly so; they're excellent and make transition away from formlib easy. \malthe ___ Zope-Dev maillist - Zope-Dev@zope.org

Communition over implementations (was: [Zope-dev] Re: zope.sendmail Retry fixes and new state machine.)

2008-03-13 Thread Dieter Maurer
David Pratt wrote at 2008-3-11 09:42 -0300: >I think your response gets to the heart of the issue. For >software to be useful, it is often more important for folks other than >the author to understand it. This can only occur with communication. >Sometimes it is the understanding of edgecases in

Doctests and edge cases (was: [Zope-dev] Re: zope.sendmail Retry fixes and new state machine.)

2008-03-13 Thread Dieter Maurer
Andreas Jung wrote at 2008-3-11 06:43 +0100: > ... >This sounds like writing doctests just for sake of having doctests for all >and everything. I completely disagree with that. In complex algorithms >edgecases are often only of interest for the person implementing the code >in order for having a

"doctest" and corner cases (was: [Zope-dev] Re: zope.sendmail Retry fixes and new state machine.)

2008-03-13 Thread Dieter Maurer
Stephan Richter wrote at 2008-3-10 22:37 -0500: >In my opinion it is as necessary to describe corner cases with words. In fact, >corner cases often need even more documentation, because they are not >obvious. It depends. Many corner cases are obvious when one looks at the implementation. If th

Re: [Zope-dev] Re: zope.sendmail Retry fixes and new state machine.

2008-03-13 Thread Dieter Maurer
Jim Fulton wrote at 2008-3-11 09:58 -0400: > >On Mar 11, 2008, at 9:46 AM, Andreas Jung wrote: >... >> You can also document your edgecase in the same way as comments >> within your >> unittests. > >This is true in theory, but in practice, it almost never happens. > >There is no guarantee that do

Re: [Zope-dev] Re: zope.sendmail Retry fixes and new state machine.

2008-03-13 Thread Dieter Maurer
Benji York wrote at 2008-3-11 09:03 -0400: >Dieter Maurer wrote: >> Looks at the ZODB tests. They make heavy use of multiple inheritance >> to compose test classes out of component test classes > >Good point; the ZODB tests make a great argument for using doctest over >unittest. After you switche

Re: [Zope-dev] Re: zope.sendmail Retry fixes and new state machine.

2008-03-13 Thread Stephan Richter
On Thursday 13 March 2008, Paul Winkler wrote: > On Tue, Mar 11, 2008 at 09:25:59AM -0400, Jim Fulton wrote: > > It is certainly straightforward enough to create isolated doctests.  For > > edge cases, I do typically create separate isolated short doctests that > > deal just with that case.  The as

Re: [Zope-dev] Re: zope.sendmail Retry fixes and new state machine.

2008-03-13 Thread Jim Fulton
On Mar 13, 2008, at 12:11 AM, Paul Winkler wrote: On Tue, Mar 11, 2008 at 09:25:59AM -0400, Jim Fulton wrote: It is certainly straightforward enough to create isolated doctests. For edge cases, I do typically create separate isolated short doctests that deal just with that case. The asse

Re: [Zope-dev] Re: zope.sendmail Retry fixes and new state machine.

2008-03-12 Thread Paul Winkler
On Tue, Mar 11, 2008 at 09:25:59AM -0400, Jim Fulton wrote: > It is certainly straightforward enough to create isolated doctests. For > edge cases, I do typically create separate isolated short doctests that > deal just with that case. The assertion that doctests don't allow > isolation is sim

Re: [Zope-dev] Re: zope.sendmail Retry fixes and new state machine.

2008-03-11 Thread Jim Fulton
On Mar 11, 2008, at 9:46 AM, Andreas Jung wrote: ... You can also document your edgecase in the same way as comments within your unittests. This is true in theory, but in practice, it almost never happens. There is no guarantee that doctests will contain useful text, but they encourage te

Re: [Zope-dev] Re: zope.sendmail Retry fixes and new state machine.

2008-03-11 Thread Andreas Jung
--On 11. März 2008 09:42:11 -0300 David Pratt <[EMAIL PROTECTED]> wrote: Hi Andreas. I think your response gets to the heart of the issue. For software to be useful, it is often more important for folks other than the author to understand it. This can only occur with communication. Sometimes

Re: [Zope-dev] Re: zope.sendmail Retry fixes and new state machine.

2008-03-11 Thread Jim Fulton
I hate to add more to this discussion, but I think some folks might have some miss-conceptions about doctests: On Mar 10, 2008, at 12:39 PM, Tres Seaver wrote: ... Becuase they make for poor unit tests? Using them to document the "mainline" use cases for an API is one thing: using them to

Re: [Zope-dev] Re: zope.sendmail Retry fixes and new state machine.

2008-03-11 Thread Benji York
Dieter Maurer wrote: Looks at the ZODB tests. They make heavy use of multiple inheritance to compose test classes out of component test classes Good point; the ZODB tests make a great argument for using doctest over unittest. and use the same tests e.g. for "FileStorage" as well as for "ZEO

Re: [Zope-dev] Re: zope.sendmail Retry fixes and new state machine.

2008-03-11 Thread David Pratt
Hi Andreas. I think your response gets to the heart of the issue. For software to be useful, it is often more important for folks other than the author to understand it. This can only occur with communication. Sometimes it is the understanding of edgecases in particular, that gets lost over tim

Re: [Zope-dev] Re: zope.sendmail Retry fixes and new state machine.

2008-03-10 Thread Andreas Jung
--On 10. März 2008 22:33:13 -0500 Stephan Richter <[EMAIL PROTECTED]> wrote: On Monday 10 March 2008, Wichert Akkerman wrote: Indeed, and for that reason this can't be said enough. Doctests are useful to create testable documentation. They are not the right tool to create isolated, debuggab

Re: [Zope-dev] Re: zope.sendmail Retry fixes and new state machine.

2008-03-10 Thread Stephan Richter
On Monday 10 March 2008, Martijn Pieters wrote: > I completely agree with Tres' and Wichert's statements on this. I only > use doctests where they actually would make sense as documentation, > the corner cases I always write as unit tests. The tools for dealing > with pure Python code are so much m

Re: [Zope-dev] Re: zope.sendmail Retry fixes and new state machine.

2008-03-10 Thread Stephan Richter
On Monday 10 March 2008, Wichert Akkerman wrote: > Indeed, and for that reason this can't be said enough. Doctests are > useful to create testable documentation. They are not the right tool to > create isolated, debuggable tests. Huh? I totally disagree. If you cannot explain your software in word

Re: [Zope-dev] Re: zope.sendmail Retry fixes and new state machine.

2008-03-10 Thread Dieter Maurer
Benji York wrote at 2008-3-10 13:03 -0400: >Wichert Akkerman wrote: >> Indeed, and for that reason this can't be said enough. Doctests are >> useful to create testable documentation. They are not the right tool to >> create isolated, debuggable tests. > >Not everyone agrees with this assertion. I

Re: [Zope-dev] Re: zope.sendmail Retry fixes and new state machine.

2008-03-10 Thread Benji York
Gary Poster wrote: Perhaps your argument, Tres, is that the effort outweighs the cost in this particular case. That's a more reasonable argument to me. Maybe the scaffolding will be arduous. I can certainly get on board with that argument.. I, myself, have added small unit tests to zope.

Re: [Zope-dev] Re: zope.sendmail Retry fixes and new state machine.

2008-03-10 Thread Jim Fulton
On Mar 10, 2008, at 1:32 PM, Benji York wrote: doctests hurt my productivity badly. I guess I'm the odd-man-out. Nope. You aren't. In fact, unittest hurt my productivity because they are almost always unfathomable. Jim -- Jim Fulton Zope Corporation

Re: [Zope-dev] Re: zope.sendmail Retry fixes and new state machine.

2008-03-10 Thread Gary Poster
On Mar 10, 2008, at 12:39 PM, Tres Seaver wrote: Gary Poster wrote: [...] Doctest/unittest holy war: bah. I've heard the arguments, I don't see either side as perfect, and I've made my choice. I'm very fine with others having different opinions and choices. As Benji said, the doctest

Re: [Zope-dev] Re: zope.sendmail Retry fixes and new state machine.

2008-03-10 Thread Benji York
Wichert Akkerman wrote: The fact that something is popular does not necessarily mean it is the right thing :) Very true. It does, however, mean that you have to have a convincing argument to change popular opinion. Lack of isolation is a very convincing argument to me. This almost never

Re: [Zope-dev] Re: zope.sendmail Retry fixes and new state machine.

2008-03-10 Thread Martijn Pieters
On Mon, Mar 10, 2008 at 6:09 PM, Wichert Akkerman <[EMAIL PROTECTED]> wrote: > The fact that something is popular does not necessarily mean it is the > right thing :) > > Lack of isolation is a very convincing argument to me. > > Perhaps more personal taste but I also find python unittests to b

Re: [Zope-dev] Re: zope.sendmail Retry fixes and new state machine.

2008-03-10 Thread Wichert Akkerman
Previously Benji York wrote: > Wichert Akkerman wrote: > >Previously Tres Seaver wrote: > >>I realize I have said this before, but then others keep urging the > >>"doctests everywhere" meme. > > > >Indeed, and for that reason this can't be said enough. Doctests are > >useful to create testable docu

Re: [Zope-dev] Re: zope.sendmail Retry fixes and new state machine.

2008-03-10 Thread Jens Vagelpohl
On Mar 10, 2008, at 17:57 , Wichert Akkerman wrote: Previously Tres Seaver wrote: Gary Poster wrote: Also, some variety of doctest would be nice. Even when a package is not using doctests, I add new tests as doctest unless there's a really good reason not to. Becuase they make for poor

Re: [Zope-dev] Re: zope.sendmail Retry fixes and new state machine.

2008-03-10 Thread Benji York
Wichert Akkerman wrote: Previously Tres Seaver wrote: I realize I have said this before, but then others keep urging the "doctests everywhere" meme. Indeed, and for that reason this can't be said enough. Doctests are useful to create testable documentation. They are not the right tool to creat

Re: [Zope-dev] Re: zope.sendmail Retry fixes and new state machine.

2008-03-10 Thread Wichert Akkerman
Previously Tres Seaver wrote: > Gary Poster wrote: > > I did a five-minute skim of the checkin but hope to look a bit more > > tomorrow. Hopefully Marius, Benji, Albertas, or someone else who has > > actually done work on this package will take a look and chime in. > > > > I did have one some

[Zope-dev] Re: zope.sendmail Retry fixes and new state machine.

2008-03-10 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Gary Poster wrote: > I did a five-minute skim of the checkin but hope to look a bit more > tomorrow. Hopefully Marius, Benji, Albertas, or someone else who has > actually done work on this package will take a look and chime in. > > I did have one

[Zope-dev] Re: zope.sendmail Retry fixes and new state machine.

2008-03-09 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Gary Poster wrote: > These changes sound great. > > I just looked for your checkins in the checkins list. I didn't find > them. If I recall correctly, this usually happens if the committer is > not subscribed to the list and has not been blessed