Closed attilaolah closed 2 years ago
how do you verify the impl?
zope.interface.verify.verifyClass(IFoo, Foo)
and zope.interface.verify.verifyObject(IFoo, Foo())
I like to put these in unit tests.
ok, sounds good.
What I do in subclasses is that I provide the missing implementation so that my tests would pass. This way I can write additional attributes to my interface subclasses and verify the implementation, which is just a quick & easy way to detect missing or broken attributes/properties/methods.
Would be cool though if the actual node base classes would implement the contract of the interface, which would mean less work for me :)
If you agree, I could branch the node
repo & add verify{Class,Object}
tests, then show you which implementations are broken, then we add those implementation (or just make them return NotImplemented
if they're meant to be implemented by the subclass).
Does this sound good to you guys? (to bad English doesn't have a für ihnen
).
+1 from me, sounds reasonable.
@attilaolah Hi, i guess this issue is long outdated. I close it. If you think otherwise, please reopen ;)
Hahaha, yes there's no chance we can still repro this :)
When I base my class on a
FactoryNode
and try to verify the implementation, I get this error message: BrokenMethodImplementation: The implementation of pop violates its contract because implementation doesn't support variable arguments.Any idea why is this?