Re: [Zope] Debugging doctests

2006-02-24 Thread Jens Vagelpohl
On 24 Feb 2006, at 16:38, Tres Seaver wrote: So, I take it that you are a second voter in favor of not requiring all tests to be doctests. Count me as another. Doctests are fine for many cases, but they suck for doing "coverage" / "edge case" testing, which are the "valuable" unit tests for

Re: [Zope] Debugging doctests

2006-02-24 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Stephan Richter wrote: > On Thursday 23 February 2006 14:16, Chris McDonough wrote: > >> (e.g. high- >>level overview of purpose, how to install it, what other packages it >>depends upon, which versions of Python/Zope it works with, who is >>respo

Re: [Zope3-Users] Re: [Zope] Debugging doctests

2006-02-24 Thread Stephan Richter
On Thursday 23 February 2006 17:18, Chris McDonough wrote: > On Feb 23, 2006, at 4:51 PM, Stephan Richter wrote: > > So, I take it that you are a second voter in favor of not requiring   > > all tests > > to be doctests. > > If the ZSCP thing takes off, I think test/doc req'ts should be   > somewha

Re: [Zope3-Users] Re: [Zope] Debugging doctests

2006-02-24 Thread Martijn Pieters
On 2/23/06, Stephan Richter <[EMAIL PROTECTED]> wrote: > On Thursday 23 February 2006 13:37, Lennart Regebro wrote: > > Not to mention, doctests are not debuggable from WingIDE. > > Maybe we should have a WingIDE sprint in Boston at some point. This would be a > good topic. Let's do this somewhere

Re: [Zope3-Users] Re: [Zope] Debugging doctests

2006-02-24 Thread Lennart Regebro
On 2/24/06, Martijn Pieters <[EMAIL PROTECTED]> wrote: > On 2/23/06, Lennart Regebro <[EMAIL PROTECTED]> wrote: > > Not to mention, doctests are not debuggable from WingIDE. ;-) > > In 2.1 you can; the following is the equivalent of pdb.set_trace(): > > wingdbstub.debugger.Break() > > :) Oh, coo

Re: [Zope3-Users] Re: [Zope] Debugging doctests

2006-02-24 Thread Martijn Pieters
On 2/23/06, Lennart Regebro <[EMAIL PROTECTED]> wrote: > Not to mention, doctests are not debuggable from WingIDE. ;-) In 2.1 you can; the following is the equivalent of pdb.set_trace(): wingdbstub.debugger.Break() :) -- Martijn Pieters ___ Zope mai

Re: [Zope3-Users] Re: [Zope] Debugging doctests

2006-02-23 Thread Chris McDonough
On Feb 23, 2006, at 4:51 PM, Stephan Richter wrote: So, I take it that you are a second voter in favor of not requiring all tests to be doctests. If the ZSCP thing takes off, I think test/doc req'ts should be somewhat looser than mandating a particular test/doc framework (something along

Re: [Zope3-Users] Re: [Zope] Debugging doctests

2006-02-23 Thread Stephan Richter
On Thursday 23 February 2006 14:16, Chris McDonough wrote: > (e.g. high- > level overview of purpose, how to install it, what other packages it   > depends upon, which versions of Python/Zope it works with, who is   > responsible for maintaining the package, where to report bugs, and so   > on).  

Re: [Zope3-Users] Re: [Zope] Debugging doctests

2006-02-23 Thread Stephan Richter
On Thursday 23 February 2006 13:37, Lennart Regebro wrote: > Not to mention, doctests are not debuggable from WingIDE. Maybe we should have a WingIDE sprint in Boston at some point. This would be a good topic. Regards, Stephan -- Stephan Richter CBU Physics & Chemistry (B.S.) / Tufts Physics (P

Re: [Zope3-Users] Re: [Zope] Debugging doctests

2006-02-23 Thread Chris McDonough
On Feb 23, 2006, at 1:57 PM, Benji York wrote: > But it's of course a judgment call. Perhaps this is just one of those to-each-his-own things. My own are doctests. ;) Sure. I actually really appreciate reading good doctests, they help a lot, and they beat not having any docs at all any

Re: [Zope3-Users] Re: [Zope] Debugging doctests

2006-02-23 Thread Chris McDonough
On Feb 23, 2006, at 1:17 PM, Benji York wrote: Chris McDonough wrote: I dunno about sucking because they are quite good for documentation, but I tend to write plain-old unittests instead of doctests when I'm testing without any pretense towards writing documentation. If you test intern

Re: [Zope3-Users] Re: [Zope] Debugging doctests

2006-02-23 Thread Lennart Regebro
On 2/23/06, Chris McDonough <[EMAIL PROTECTED]> wrote: > I dunno about sucking because they are quite good for documentation, Oh, absolutely. > but I tend to write plain-old unittests instead of doctests when I'm > testing without any pretense towards writing documentation. Exactly my sentiments

Re: [Zope3-Users] Re: [Zope] Debugging doctests

2006-02-23 Thread Chris McDonough
I dunno about sucking because they are quite good for documentation, but I tend to write plain-old unittests instead of doctests when I'm testing without any pretense towards writing documentation. If you test internals of a class in a doctest, the doctest body gets pretty cluttered, which

Re: [Zope3-Users] Re: [Zope] Debugging doctests

2006-02-23 Thread Lennart Regebro
On 2/23/06, Gary Poster <[EMAIL PROTECTED]> wrote: > You effectively can't step through all the tests (with a single > pdb). You can step through a single line in the test well. While it > sounds limiting, that has proved quite sufficient for me in > practice. YMMV, of course. Sigh. doctests re

Re: [Zope] Debugging doctests

2006-02-23 Thread Stephan Richter
On Thursday 23 February 2006 08:13, Lennart Regebro wrote: > As you see, I can't even step into that next line. And even if I > could, the necessity of having to step through the doctestrunning > would be a major pain in the ass. Ok, I have never needed this. And I can see why it does not work. Ev

Re: [Zope] Debugging doctests

2006-02-23 Thread Lennart Regebro
On 2/23/06, Stephan Richter <[EMAIL PROTECTED]> wrote: > How do you want to use the debugger? I'd like to be able to step through the tests. > I run the tests, if the set_trace() > occurs it throws me to the prompt and all is fine. I can use the debugger as > usual. When I do this, I get a promp

Re: [Zope] Debugging doctests

2006-02-23 Thread Stephan Richter
On Thursday 23 February 2006 06:53, Lennart Regebro wrote: > Ah, not in Zope 2.9 it seems. Is this expected, or an I doing something > wrong? I'm running the Five tests with bin/zopectl test --dir Products/Five > as usual, and having a set_trace() in the doctests behaves exactly as with > the old t