Ñò ¶TJJc@s›dZddklZlZddklZddklZlZddkl Z l Z l Z efZ dd d„Zdd„Zdd „Zd „Zd S( sUVerify interface implementations $Id: verify.py 92658 2008-10-28 17:12:35Z tlotze $ iÿÿÿÿ(tBrokenImplementationtDoesNotImplement(tBrokenMethodImplementation(t FunctionTypet MethodType(t fromMethodt fromFunctiontMethodic Csª|djo |i}n |i}| o||ƒ ot|ƒ‚nxZ|idƒD]I\}}yt||ƒ}WnGtj o;t|tƒ o|djoqYnt||ƒ‚nXt|tƒpqYnt|t ƒot ||d|ƒ}n`t|t ƒo,t |i ƒt jot|||ƒ}n$t|ƒpt|dƒ‚qYqY|iƒ}|iƒ}t||ƒ} | ot|| ƒ‚qYqYWtS(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. tcitnames Not a method(t implementedByt providedByRtnamesAndDescriptionstgetattrtAttributeErrort isinstanceRRRRt MethodTypesttypetim_funcRtcallableRtgetSignatureInfot _incompattTrue( tifacet candidatet tentativetvtypettesterR tdesctattrtmethtmess((s;/usr/lib64/python2.6/site-packages/zope/interface/verify.pyt_verifys:       cCst|||ddƒS(NRR(R (RRR((s;/usr/lib64/python2.6/site-packages/zope/interface/verify.pyt verifyClass]scCst|||ddƒS(NRto(R (RRR((s;/usr/lib64/python2.6/site-packages/zope/interface/verify.pyt verifyObject`scCs”t|dƒt|dƒjodSt|dƒt|dƒjo|d odS|do|d odS|do|d odSdS( Ntrequireds*implementation requires too many argumentst positionaltvarargss-implementation doesn't allow enough argumentstkwargss0implementation doesn't support keyword argumentss1implementation doesn't support variable arguments(tlen(R$t implemented((s;/usr/lib64/python2.6/site-packages/zope/interface/verify.pyRcs!! N(t__doc__tzope.interface.exceptionsRRRttypesRRtzope.interface.interfaceRRRRtNoneR R!R#R(((s;/usr/lib64/python2.6/site-packages/zope/interface/verify.pyts A