[Zope3-dev] verifyObject failing for all field types
Garrett Smith
garrett at mojave-corp.com
Mon Aug 30 12:46:01 EDT 2004
A recent change is causing fields to fail verifyObject. E.g. adding the
following test to test_date.py:
def testInterface(self):
from zope.interface.verify import verifyObject
from zope.schema.interfaces import IDate
verifyObject(IDate, self._Field_Factory())
results in:
BrokenMethodImplementation: The implementation of constraint violates
its contract
because Not a method.
'constraint' is None, and therefore not callable, which is causing the
failure.
Should the check on callable pass if the attribute is None? Or do we
need to add a no-op callable for the 'constraint' default value for
Field?
--Garrett
More information about the Zope3-dev
mailing list