Hi,

Jim Fulton wrote:
> Christian Theune wrote:
>> Hi everyone,
>>
>> Thomas Lotze and I were working on creating a zc.buildout for one of our
>> internal projects.
>>
>> The ZCML of our application is loaded using the 'package-includes'
>> mechanism.
> 
> I think this is a bad idea.  I think for serious development,
> package-includes is a bad idea.  For our projects, we *never*
> use package-includes.

Can we declare package-includes to be bad in general than and abandon it
please? At least tell everyone not to use it if possible?

>  > To support functional testing, a 'kita-ftesting.zcml' slug
>> was placed in the 'package-includes' and - as far as I can tell - this
>> takes care to only load this ZCML when running functional tests.
> 
> I have no idea what you are trying to say.

The 'package-includes' mechanism is set up in a normal instance that
site-zcml does not load *-ftesting.zcml slugs, whereas ftesting.zcml
does includes *-ftesting.zcml slugs, so you can 'safely' place your
ftesting configuration there.

>> We're having a problem with the buildout integration at this point, as
>> for the testrunner we are using the zc.recipe.testrunner recipe.
>>
>> However, the functional testing ZCML is placed in the instance part, but
>> the testrunner does not know anything about this (should it?).
> 
> You'll need to use the working-directory option in the testrunner recipe to 
> get it
> to run from the instance.  The functional test code in 
> zope.app.testing.functional
> *assumes* that the current working directory is an instance directory. :(

Ah. I didn't make the connection in my brain to make the test runner
change the working directory. That sounds reasonable right now.

>> Here's the question: what would be a good way to get the test runner
>> load the correct ZCML for running tests?
> 
> IMO, the package you want to test should define it's own
> ftesting.zcml and define a zcml-based test layer based on that.
> see zc.sharing as an example.

Ah. I forgot to use zc.sharing as a buildout example.

Thanks,
Christian

-- 
gocept gmbh & co. kg - forsterstra├če 29 - 06112 halle/saale - germany
www.gocept.com - [EMAIL PROTECTED] - phone +49 345 122 9889 7 -
fax +49 345 122 9889 1 - zope and plone consulting and development


Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to