[Twisted-Python] Re: [Twisted-commits] r15100 - So I really do want this stuff
James Y Knight
foom at fuhm.net
Sat Nov 12 09:31:43 EST 2005
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?
James
More information about the Twisted-Python
mailing list