Skip to content

verifyObject doesn't verify keyword arguments #140

@jluttine

Description

@jluttine

Given the following:

class IFoo(zope.interface.Interface):
    def bar(lorem="ipsum", alice=42):
        """ ... """

@zope.interface.implementer(IFoo)
class Foo():
    def bar(self, x=666, y=99):
        return x + y

I would have expected verification to fail but it doesn't:

>>> zope.interface.verify.verifyObject(IFoo, Foo())
True

How can I force verifyObject to verify the function signature exactly? So that it it is exactly the same (same positional and keyword arguments with same names in same order and also the same *args and **kwargs).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions