mò "á¸Ec@sdklZlZdklZdklZdklZlZdk l Z dd d„Z dd„Z dd„Zd „Zd S( (sBrokenImplementationsDoesNotImplement(sBrokenMethodImplementation(s FunctionType(s fromMethods fromFunction(s MethodTypesic Cs/|djo |i}n |i}| o||ƒ ot|ƒ‚nxß|idƒD]Î\}}t ||ƒpt ||ƒ‚nt ||ƒ} t| ƒtjot| |ƒ}n*t| ƒtjot| |ƒ}nqY|iƒ}|iƒ}t||ƒ}|ot||ƒ‚qYqYWdS(sÒ Verify that 'candidate' might correctly implements 'iface'. This involves: o Making sure the candidate defines all the necessary methods o Making sure the methods have the correct signature o Making sure the candidate asserts that it implements the interface Note that this isn't the same as verifying that the class does implement the interface. If optional tentative is true, suppress the "is implemented by" test. tciN(tvtypetifacetisImplementedByInstancesOfttestertisImplementedByt tentativet candidatetDoesNotImplementtnamesAndDescriptionstntdthasattrtBrokenImplementationtgetattrtattrttypet FunctionTypet fromFunctiontmetht MethodTypest fromMethodtgetSignatureInfot _incompattmesstBrokenMethodImplementation( RRRRR RRR RR((t//data/zmath/zope/lib/python/Interface/Verify.pyt_verifys,      cCst|||ddƒS(NRR(RRRR(RRR((Rt verifyClassEscCst|||ddƒS(NRto(RRRR(RRR((Rt verifyObjectHscCs t|dƒt|dƒjodSnt|dƒt|dƒjo|d odSn|do|d odSn|do|d odSndS( Ntrequireds*implementation requires too many argumentst positionaltvarargss-implementation doesn't allow enough argumentstkwargss0implementation doesn't support keyword argumentss1implementation doesn't support variable arguments(tlent implementedR(RR$((RRKs!-N(t ExceptionsR RRttypesRtMethodRRt_objectRtNoneRRRR( RRRRRRRRRR R((Rt?s   0