[Twisted-Python] Re: [Twisted-commits] r15100 - So I really do want this stuff
Jonathan Lange
jml at mumak.net
Sat Nov 12 14:34:49 MST 2005
On 13/11/05, James Y Knight <foom at fuhm.net> wrote:
>
> On Nov 11, 2005, at 5:11 PM, Jonathan Lange wrote:
> >> This seems to beg the question:
> >>
> >> Why?
> >>
> >> So, consider it begged :)
> >>
> >>
> >
> > Because I'm going to implement setUpClass using this stuff.
> >
> > Why?
> >
> > Because the current implementation is horrible, as discussed.
>
> 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.
jml
More information about the Twisted-Python
mailing list