[Zope-CMF] Test failing under Zope 2.5.1

Tres Seaver tseaver@zope.com
21 Jan 2003 17:16:47 -0500


On Tue, 2003-01-21 at 15:01, Yuppie wrote:
> Chris Withers wrote:
> > The following test fails under 2.5.1 but passes under 2.6.0:
> > 
> > ======================================================================
> > ERROR: test_interface 
> > (Products.CMFCore.tests.test_ActionProviderBase.ActionProv
> > iderBaseTests)
> > ----------------------------------------------------------------------
> > Traceback (most recent call last):
> >   File "D:\Zope\cmf2Products\CMFCore\tests\test_ActionProviderBase.py", 
> > line 154
> > , in test_interface
> >     verifyClass(IActionProvider, ActionProviderBase)
> >   File "D:\ZOPE\25228D~1.1\lib\python\Interface\verify.py", line 35, in 
> > verify_c
> > lass_implementation
> >     raise BrokenMethodImplementation(n)
> > BrokenMethodImplementation: An object has failed to implement the method 
> > listAct
> > ions
> > 
> >         The signature is incorrect.
> > 
> > Why is this happening and do we care?
> 
> I have no idea why this happens, but I wrote the test so I'll have a 
> look at it.
> 
> 
> CMF 1.3 Requirements:
>      - Zope v. 2.4.3 or later, v. 2.5 and later (*not* 2.4.2 or 2.4.1)
> 
> I think we should care. CMF tests should pass with all these releases.

Zope 2.6 backported a bugfix to the 'verify' module which is a likely
explanation.  In this case, I am willing to let the test fail
indefinitely, as it is Zope 2.5.1 which is borked, rather than the CMF
code.

The specifics here are:

  - Products.CMFCore.interfaces.portal_actions.ActionProvider
    has a 'listActions' method with one required argument, 'info'.

  - Products.CMFCore.ActionProviderBase.ActionProviderBase.listActions
    defaults the 'info' argument to 'None'

Therefore, any client who expects the more restrictive contract (from
the interface) will be unsurprised by the implementation.

We could relax the interface, which might then reveal other places which
were "broken". :)

Tres.
-- 
===============================================================
Tres Seaver                                tseaver@zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com