[Zope-CMF] GenericSetup global registries

Wichert Akkerman wichert at wiggy.net
Tue Mar 8 16:01:01 EST 2011


On 2011-3-8 17:43, Godefroid Chapelle wrote:
> Le 08/03/11 17:26, Wichert Akkerman a écrit :
>> On 2011-3-8 17:08, Godefroid Chapelle wrote:
>>>>   Hello,
>>>>
>>>>   GenericSetup has global registries for profiles and steps.
>>>>
>>>>   They are a PITA when testing.
>>>>
>>>>   For instance, plone.app.testing has to make a complicated dance to
>>>>   record and restore their state.
>> How come? There is a very simple cleanup function for them iirc?
>
> zope.testing.cleanup functions are all or nothing; there are no ways to
> clear a part of what was loaded through ZCML.
> plone.testing zca.py uses component registry chaining to enable partial
> unload of components registrations.

And you could extend it to snapshot GS profiles. Lack of support in 
plone.testing to do that is not a good reason for complicating GS and 
making it harder to debug imho.

Wichert.


-- 
Wichert Akkerman <wichert at wiggy.net>   It is simple to make things.
http://www.wiggy.net/                  It is hard to make things simple.



More information about the Zope-CMF mailing list