[Python-3000] Abilities / Interfaces

Andrew Koenig ark-mlist at att.net
Wed Nov 22 15:51:27 CET 2006


> I believe Ka-Ping once proposed something similar. This also jives
> nicely with the "verify" functionality that I mentioned. However, I
> don't know how easy it will be to write such compliance tests given
> that typically the constructor signature is not part of the ability.
> It may be more pragmatic to put the tests in a separate unit testing
> module that can be subclassed by unit testing code for classes that
> want specific claims to be verified.

Well, suppose we invent an ability that indicates compliance with a
unit-test protocol.  Objects that have this ability have a method or methods
that can be used to test the object, to the extend that the author wants to
render it testable.

Then the verify functionality could, as a matter of convention, self-test
all objects that claim to be auditable, without the verifier having to know
the details.
 



More information about the Python-3000 mailing list