[Zope-dev] Re: CMFSetup + ZopeTestCase interaction bug

Lennart Regebro regebro at gmail.com
Tue May 31 09:42:51 EDT 2005


On 5/25/05, Lennart Regebro <regebro at gmail.com> wrote:
> When you use the installProduct command of ZopeTestCase on a product
> that has a CMFSetup profile you may get the following error:
> 
> File "/home/zopes/27test/Products/CMFSetup/registry.py", line 567, in
> registerProfile
>     raise KeyError, 'Duplicate profile ID: %s' % profile_id
> KeyError: 'Duplicate profile ID: <profile id>'
> 
> This typically happens on the profile "CMFDefault:default". This also
> *only* happens if you try to run all tests in Products. The reason
> seem to be that all or some of the products gets installed by Zope.
> When you then try to install them again with installProduct, you get
> the error.
> 
> My suggested solution is to "merge" ZopeTestCases list of installed
> products with Zopes list of installed products, as these for the
> moment are not the same, as far as I can see.

I discussed this with Stefan  Holek yesterday, and today I tried this
solution, and it seems to work fine.
 
> This error happens both with Zope2.7 and 2.8.

But...I suggest that I only change this in Zope 2.8 anyway, to make
sure we don't break anything that relies on this ZopeTestCase
behaviour. Unless somebody screams, I will include this bugfix in 2.8
today or tomorrow.

-- 
Lennart Regebro, Nuxeo     http://www.nuxeo.com/
CPS Content Management     http://www.cps-project.org/


More information about the Zope-Dev mailing list