[Zope-dev] zope.component: calling an Interface and calling queryAdapter give differing results
Chris Withers
chris at simplistix.co.uk
Fri Oct 3 10:18:34 EDT 2008
Tres Seaver wrote:
>> I guess it must be, since calling an interface already does some adaptation.
>
> No, there is no dependency: zope.interface defines a hook point that
> zope.component uses. In the absence of zope.component, zope.interface
> uses a default implementation.
That sound pretty icky. What does this implementation do? Would a
similar implementation be needed for the 'adapt' method or do we just
raise a ComponentLookupError in the default implementation?
How do we test this different type of behaviour?
How do we test that zope.component provides the right hooks and that
they get called correctly?
>> Can anyone else confirm this and give me a hint as to where the tests
>> and code should go?
>
> Tests likely belong in 'zope.interface.tests.test_adapter'.
OK.
cheers,
Chris
--
Simplistix - Content Management, Zope & Python Consulting
- http://www.simplistix.co.uk
More information about the Zope-Dev
mailing list