Downsides of moving from Products to lib/python?

Kai Diefenbach usenet at diefenba.ch
Wed Sep 12 14:33:29 UTC 2007


Hi Martin,

Martin Aspeli <optilude at gmx.net> wrote:

> Kai Diefenbach wrote: > > Today I run into following issue: > > From a
> pure package based product (within lib/python) the initialize > method
> (aka: "Intializer called when used as a Zope 2 product.") within >
> __init__.py is not called when I run tests: zopectl test -m ...  (It is >
> when the instance is started normally: e.g. zopectl fg) >
> 
> This is because you're not doing the test setup right. Look at
> http://dev.plone.org/collective/browser/borg/components/borg.project/trunk
> /borg/project/tests.py.

I tried out an adapted version of your setup for my product before I
posted and it didn't help.

Now I tried it again with a fresh buildout
(http://pastie.textmate.org/96457), borg and
membrane (branch for 3.0) checked out in the products directory, running
bin/instance test -m borg.project I got:
    
    installProduct() got an unexpected keyword argument 'package'

Whole Traceback:

    http://pastie.textmate.org/pastes/96455

The initialize methode is not called. When I run the tests for
borg.localrole initialize is not called, too.

If I start the instance with fg both initialize methods - from
borg.project and borg.localrole - are called.

Thanks
Kai

-- 
Kai Diefenbach - http://diefenba.ch
iqplusplus - http://iqpp.de





More information about the Product-Developers mailing list