[TIP] RFC: additional data in unittest TestResult outcomes

Michael Foord fuzzyman at voidspace.org.uk
Tue Sep 22 04:42:17 PDT 2009


Thanks Rob - that helps me understand. I'm interested in any feedback on 
this. One inline note below.

Robert Collins wrote:
> On Tue, 2009-09-22 at 11:31 +0100, Michael Foord wrote:
>   
>> This is really interesting Robert, but there is a lot of detail. Can
>> you 
>> provide an abstract / summary?
>>     
>
> 'allow more than just backtraces on test outcomes'.
>
>   
>> It seems to be a protocol for object serialisation on test results 
>> composed of several parts.
>>     
>
> I want to enable serialisation more than anything; this isn't a big
> change to the library - TestResult stringify's backtraces today.
>
>   
>> Methods on TestResult for attaching information.
>>     
>
> Outcomes - exactly what we have today - addFailure, addError, AddSkip,
> addSuccess, addExpectedFailure etc, but given a new name as a migration
> strategy [vs attempting with a new keyword argument or similar; we could
> do it that way - I'm open].
>   

I have a preference for adding a keyword argument over proliferating 
methods. That's about my only comment at this point. :-)

Michael


>   
>> Standard ways of storing that information.
>>     
>
> Not storing so much, as just being clear about it, so that folk who /do/
> want to store or forward can do so with minimal loss of structure. e.g.
> Tribunal should be able to get a detailed assertion from a Trial test
> that fails, in a standard manner.
>
>   
>> A text serialisation protocol for communicating result information.
>>     
>
> not at all :) but it should be trivial to write protocols with these
> modifications. I don't want to obsolete Pandokia or Subunit - far from
> it. I want to make unittest.py compatible with more of the capabilities
> of these external tools, so they don't have to hack stuff around to get
> data from test cases.
>
> -Rob
>   


-- 
http://www.ironpythoninaction.com/




More information about the testing-in-python mailing list