[Zope3-dev] Test Layers

Chris Withers chris at simplistix.co.uk
Tue Oct 17 08:38:13 EDT 2006


Jim Fulton wrote:
>> I may be missing some then... which narratives are you thinking of?
> 
> You cited 3 in your note.

I'd like there to be a good narrative that actually ships in 
zope.testing, I'm willing to do the work to make that happen provided I 
can get some help on writing the doctest of zope.testing that's required...

> You create a layer whose __bases__ include LayerX and
> LayerY.  If you're layers happen to be implemented
> as classic classes, you then could use subclassing.

What happens with new style classes?

>> Basically, will the above work or will the savepoints become a 
>> horrible jumbled mess and I end up with several ZODB connections as well?
> 
> That's a good question. 

I was afraid you'd say that ;-)

> Looking at the code on the zope.testing trunk,
> it looks like this should work.

I'll give it a try with Zope 2.9 then... if you hear my screams of pain 
from across the atlantic, you'll know something hasn't worked right...

>> PS: can I use '.MyLayer' as a layer, or do I always need to put the 
>> full dotted path in?
> 
> You have to use a full dotted path.  You can also use the
> Layer object itself.

Ah, didn't know you could use the Layer object itself...

Chris

-- 
Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk


More information about the Zope3-dev mailing list