[Zope] Re: [Zope-dev] Re: [Warning] Zope 3 component architecture (CA) not reliably usable for registrations from Python

Dieter Maurer dieter at handshake.de
Fri Jan 12 13:13:12 EST 2007


Stephan Richter wrote at 2007-1-12 03:03 -0500:
>On Thursday 11 January 2007 16:10, Dieter Maurer wrote:
>> I can see that such a strategy may be helpful when one wants to
>> resolve conflicts in some way. However, I do not see
>> why is should be necessary for registration that are not expected
>> to conflict.
>
>Going into some detail. If imports have registration side-effects, then a test 
>suite can never cleanly tear down. After each test suite run, the entire 
>component architecture registry is cleared. That would also clear all your 
>regstrations made during import time. There are strategies to deal with this, 
>see zope.security package, but it is tedious and takes time to get fully 
>right.

But, you have this problem with ZCML registrations as well.

For testing purposes, the module can provide a function "performRegistrations"
that an interested test can call to ensure that the registrations are
done.



-- 
Dieter


More information about the Zope-Dev mailing list