[Twisted-Python] Re: [Twisted-commits] r15100 - So I really do want this stuff
James Y Knight
foom at fuhm.net
Sat Nov 12 17:05:24 EST 2005
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()
>> for each method in testCase:
>> 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. So what is this multiple-instance thing
really for? Is this just an annoyance forced by unittest
compatibility, or is there actually a reason for that complication?
More information about the Twisted-Python