Hi Jens!

Jens Vagelpohl wrote:
On 22 Jan 2007, at 01:43, Philipp von Weitershausen wrote:
Jens Vagelpohl wrote:
Other than that I have one unrelated failure in the GS tests themselves and some logger messages coming through, all those smell like test cleanup issues to me. If I run the GenericSetup tests by themselves I don't get any failure.


Long live layers to push all the Zope 2 crap into that can't be torn down.

The logging message happens in a layer, Products.CMFCalendar.testing.FunctionalLayer. I have to admit that anything having to do with either the CMFCalendar FunctionalLayer or the CMFCore FunctionalLayer has been a pain in the ass to fix with this utility work.

The logging messages no longer show up and I simplified the FunctionalLayer tests. No need to register the tools again - setSite(self.app.site) sets up the correct registry.

But the cleanup issues are still not resolved. AFAICS the problem is caused by the new registerUtility() calls that pollute the global registry.

Inside layers we can't use cleanUp() because it would destroy the layer setup. I'm afraid each test needs an explicit unregisterUtility() for each registered tool.

Or maybe we should perform a complete set up / tear down for each unit test, not just for the layer. This way we can always use cleanUp(). That might not be too expensive for non-functional tests.

Functional tests don't have the same problem because there is no need to mess around with the global registry.



Zope-CMF maillist  -  Zope-CMF@lists.zope.org

See http://collector.zope.org/CMF for bug reports and feature requests

Reply via email to