[Twisted-Python] Re: [Twisted-commits] r15100 - So I really do want this stuff

Jonathan Lange jml at mumak.net
Sun Nov 13 04:29:40 EST 2005


On 13/11/05, Jean-Paul Calderone <exarkun at divmod.com> wrote:
> On Sun, 13 Nov 2005 12:33:41 +1100, Jonathan Lange <jml at mumak.net> wrote:
> >On 13/11/05, James Y Knight <foom at fuhm.net> wrote:
> >> On Nov 12, 2005, at 4:34 PM, Jonathan Lange wrote:
> >> > On 13/11/05, James Y Knight <foom at fuhm.net> wrote:
> >> >>
> >> >> Maybe this is a stupid question, but I'm confused as to why the
> >> >> implementation isn't straightforward, something along the lines of
> >> >> the following:
> >> >>
> >> >> for each module to test:
> >> >>    for each class that is a subclass of TestCase in module:
> >> >>      testCase = class()
> >> >>      testCase.setUpClass()
> >> >>      for each method in testCase:
> >> >>        testCase.setUp()
> >> >>        testCase.method()
> >> >>        testCase.tearDown()
> >> >>      testCase.tearDownClass()
> >> >>
> >> >> Now I now it has to be somewhat more complicated, due to error
> >> >> handling, deferred handling, suppress, etc, but it does seem like
> >> >> that would be the outline...can it not be?
> >> >>
> >> >
> >> > The short answer: An instance of a TestCase subclass represents a
> >> > single test.
> >>
> >> But not to the user...if I set attributes on the instance, they stay
> >> set across all test methods.
> >
> >This is a bug, not a feature.
>
> Why is it a bug?
>

Given that we are the ones with the non-standard behaviour, I'd like
to know why it's considered a feature.




More information about the Twisted-Python mailing list