← Back to team overview

oship-dev team mailing list archive

Re: Should I instantiate all the objects in a doctest?

 

On Tue, 2009-12-01 at 18:14 -0200, Tim Cook wrote:

> One thing you need to be aware of is that interfaces all inherit from
> Interface.  So, in the subclasses you need to include those abstract
> interfaces in the implements function, i.e.
> 
> class ItemList(ItemStructure):
>      implements(IItemList, IItemStructure)
> 
> Because in some interfaces it simply says that the attribute must
> provide IItemStructure.  It can be an ItemList or ItemTable, etc.
> 


Actually, the above statement isn't true.

I just modified datastructures.txt and dvmultimedia.txt to test if
Interfaces are inherited via class inheritance and they are.  So there
is no need to do the above.

The test in dvmultimedia looks like this (where mm is a Multimedia
instance):

>>> IDvEncapsulated.providedBy(mm)
True

--Tim




-- 
***************************************************************
Timothy Cook, MSc

LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook 
Skype ID == (upon request)
Academic.Edu Profile: http://uff.academia.edu/TimothyCook

You may get my Public GPG key from  popular keyservers or    
from this link http://timothywayne.cook.googlepages.com/home 

Attachment: signature.asc
Description: This is a digitally signed message part


Follow ups

References