← Back to team overview

oship-dev team mailing list archive

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

 

Hi Tim.

I made the doctest now and sent it to the server. I needed to modify some
classes (ContentItem and ItemTree) because their father class weren't
Locatable. They should be Locatable, right? When you see what I did please
give me some feedback!

Thanks.

2009/12/1 Tim Cook <timothywayne.cook@xxxxxxxxx>

> 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
>
>

Follow ups

References