Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Zope: CMF
Test setup problems with Zope 2.13
 

Index | Next | Previous | View Flat


hanno at hannosch

Jul 11, 2010, 4:54 AM


Views: 1891
Permalink
Test setup problems with Zope 2.13

Hi.

Maybe you have noticed from my commits today, but we have some test
setup problems in Zope 2.13. I tried to solve those, but failed so
far. Unfortunately we don't have nightly test runs for any CMF + Zope
2.13 combination for a while, so I'm not sure when all the problems
started.

One recent problem is due to my refactoring of Products.OFSP / OFS
though. I moved the registrations of all standard OFS types from the
initialize of OFSP into an initialize in OFS itself. In order for this
to be picked up, I added the five:registerPackage statement, including
a hint at the initialize function to OFS' configure.zcml.

During normal Zope startup this works fine and the initialize is
called. But we have a problem with ZopeTestCase based tests. So far it
did an installProduct('OFSP') call unconditionally at module scope. As
soon as someone imported it, the OFS types got registered. If the
ZopeLite layer was active, the call was deferred to its layer setup
time.

In Zope 2.13 I removed the installProduct('OFSP') call, as it doesn't
do anything anymore (apart from registering help system stuff which
nobody needs in tests). But I cannot simply put an
installPackage('OFS') in there as a replacement. In order for that to
work, one needs to load the OFS.configure.zcml first (the
five:registerPackage to be exact). Since ZopeTestCase doesn't know
anything about ZCML setup so far, I don't want to introduce any such
handling. Consumers of ZopeTestCase have all dealt with ZCML loading
in various different ways and I expect even bigger problems when
changing anything there.

But this means any testcase that needs the OFS types (to show up in
all_meta_types for example) will need to set up the ZCML and call
installPackage itself. I tried to do this in CMFCore by adding a new
layer, but cannot get it to work. There's always some side-effects in
other tests. It doesn't help that installPackage internally does a
transaction.commit() in 2.12 but not in 2.13.

If anyone more familiar with the multitude of CMF test layers could
help, that would be much appreciated.

Hanno
_______________________________________________
Zope-CMF maillist - Zope-CMF [at] zope
https://mail.zope.org/mailman/listinfo/zope-cmf

See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests

Subject User Time
Test setup problems with Zope 2.13 hanno at hannosch Jul 11, 2010, 4:54 AM
    Re: Test setup problems with Zope 2.13 charlie.clark at clark-consulting Jul 11, 2010, 10:31 AM
        Re: Test setup problems with Zope 2.13 hanno at hannosch Jul 11, 2010, 10:39 AM
    Re: Test setup problems with Zope 2.13 charlie.clark at clark-consulting Jul 11, 2010, 11:11 AM
        Re: Test setup problems with Zope 2.13 hanno at hannosch Jul 11, 2010, 11:24 AM
    Re: Test setup problems with Zope 2.13 hanno at hannosch Jul 19, 2010, 11:53 AM
    Re: Test setup problems with Zope 2.13 y.2010 at wcm-solutions Jul 22, 2010, 4:37 AM
        Re: Test setup problems with Zope 2.13 y.2010 at wcm-solutions Jul 22, 2010, 5:00 AM
            Re: Test setup problems with Zope 2.13 hanno at hannosch Jul 24, 2010, 6:26 AM
    Re: Test setup problems with Zope 2.13 hanno at hannosch Jul 25, 2010, 3:17 AM
    Re: Test setup problems with Zope 2.13 y.2010 at wcm-solutions Jul 27, 2010, 4:09 AM
        Re: Test setup problems with Zope 2.13 hanno at hannosch Jul 28, 2010, 2:45 AM
    Re: Test setup problems with Zope 2.13 y.2010 at wcm-solutions Jul 28, 2010, 4:17 AM
        Re: Test setup problems with Zope 2.13 hanno at hannosch Jul 28, 2010, 5:28 AM
    Re: Test setup problems with Zope 2.13 charlie.clark at clark-consulting Jul 28, 2010, 5:32 AM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.