Andreas Jung wrote:
I added Products/PageTemplates/configure.zcml to register an utility.
That works fine when running Zope however "zopectl test" won't work properly anymore because the utility registration does not seem to happen when running the tests. Bug or feature?

Tests need to do their own setup. ZCML isn't magically loaded for tests, unless those tests are run within a layer that loads all ZCML before running the tests.

So, there are two options:
- modify the setUp() of the tests in question to provideUtility(your_utility) - make the respective tests run in a layer that loads the ZCML. I don't think layer support is on the trunk yet. Whit Morriss has a branch where he added that to Zope 2, but it still hasn't been merged :(

Philipp

--
http://worldcookery.com -- Professional Zope documentation and training
2nd edition of Web Component Development with Zope 3 is now shipping!
_______________________________________________
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )

Reply via email to