/Qc@sdZddlZdejfdYZdZdefdYZdefd YZd efd YZd efd YZdefdYZ defdYZ defdYZ defdYZ dZ dS(sAdapter registry tests iNt_SilencePy3DeprecationscBseZdZdZRS(cCs |j|S(N(t assertTrue(tselftexpr((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt failUnlessscCs |j|S(N(t assertFalse(RR((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pytfailIfs(t__name__t __module__RR(((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRs c Csddlm}d|fdY}d|fdY}d|fdY}d ||fd Y}d ||fd Y}d |fdY}d|fdY}d|fdY}d|fdY} ||||||||| f S(Ni(t InterfacetIB0cBseZRS((RR(((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyR !stIB1cBseZRS((RR(((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyR "stIB2cBseZRS((RR(((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyR #stIB3cBseZRS((RR(((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyR $stIB4cBseZRS((RR(((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyR%stIF0cBseZRS((RR(((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyR'stIF1cBseZRS((RR(((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyR(stIR0cBseZRS((RR(((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyR*stIR1cBseZRS((RR(((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyR+s(tzope.interfaceR ( R R R R R RRRRR((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt_makeInterfacesstBaseAdapterRegistryTestscBseZdZdZdZdZdZdZdZdZ dZ d Z d Z d Z d Zd ZdZdZdZdZdZdZdZdZdZdZRS(cCsTddlm}d|fdY}x'|jD]}t|j|tq0W|S(Ni(tBaseAdapterRegistryt_CUTcBseZdefdYZRS(t LookupClasscBs6eZdZZdZdZdZdZRS(cSsdS(N((Rtreg((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt__init__7scSs|j|f7_dS(N(t_changed(Rtorig((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pytchanged9scSs|j|f7_dS(N(t _extendors(Rtprovided((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt add_extendor;scSs5tg|jD]}||kr |^q |_dS(N(ttupleR(RRtx((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pytremove_extendor=s((RRRRRRR R#(((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyR5s     (RRtobjectR(((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyR4s(tzope.interface.adapterRt _delegatedtsetattrRR$(RRRtname((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt_getTargetClass2s  cCs |jS(N(R)(R((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt_makeOneDscCsU|j}|}x9|jD].}|jt||t|j|kqWdS(N(R)R&Rtgetattrt _v_lookup(RtCUTtregistryR(((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyttest_lookup_delegationGs   cCs#|j}|j|jddS(Ni(R*t assertEqualt _generation(RR.((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt"test__generation_on_first_creationNs cCsU|j}t}|j||j|jd|j|jj||fdS(Ni(R*R$RR0R1R,R(RR.R((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt&test__generation_after_calling_changedSs    cCsEdtfdY}|j}|f|_|j|jddS(Nt_BasecBseZRS((RR(((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyR4\si(R$R*t __bases__R0R1(RR4R.((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt)test__generation_after_changing___bases__[s  c Cst\ }}}}}}}}} |j} | j|g|dd|j| j|g|dd|jt| jd|j| jddS(NttA1i(RR*tregisterR0t registeredtlent _adaptersR1( RR R R R RRRRRR.((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt test_registeras $ "c Cst\ }}}}}}}}} |j} | jdg|dd| jdg|dd|jt| jddS(NR7R8i(RR*R9tNoneR0R;R<( RR R R R RRRRRR.((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt)test_register_with_value_None_unregistersis $ c Cst\ }}}}}}}}} |j} t} | jdg|d| | j} | jdg|d| |j| j| dS(NR7(RR*R$R9R>R1R0( RR R R R RRRRRR.t_valuet_before((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyttest_register_with_same_valueps$   cCs2|j}|j|jdgddddS(NR7(R*R0R:R>(RR.((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyttest_registered_emptyys c Csot\ }}}}}}}}} |j} | j|gddd|j| j|gddddS(NR7R8(RR*R9R>R0R:( RR R R R RRRRRR.((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyttest_registered_non_empty_miss}s$ cCsK|j}|jdgddd|j|jdgddddS(NR7R8(R*R9R>R0R:(RR.((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyttest_registered_non_empty_hits cCsH|j}|jdgdd|j|jdgddddS(NR7(R*t unregisterR>R0R:(RR.((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyttest_unregister_emptys c Cst\ }}}}}}}}} |j} | j|gddd| j|gdd|j| j|gddddS(NR7R8(RR*R9R>RFR0R:( RR R R R RRRRRR.((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt*test_unregister_non_empty_miss_on_requireds $ c Cst\ }}}}}}}}} |j} | j|gddd| j|gdd|j| j|gddddS(NR7R8tnonesuch(RR*R9R>RFR0R:( RR R R R RRRRRR.((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt&test_unregister_non_empty_miss_on_names $ c Cst\ }}}}}}}}} |j} t} t} | j|gdd| | j|gdd| |j| j|gdd| kdS(NR7(RR*R$R9R>RFRR:( RR R R R RRRRRR.Rtnomatch((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt(test_unregister_with_value_not_None_misss$   c Cst\ }}}}}}}}} |j} t} t} | j||gdd| | j||gdd| |j|| jd|k|j|| jd|k| j||gdd| |j|| jd|k|j|| jd|kdS(NR7i( RR*R$R9R>RR<RFR( RR R R R RRRRRR.tonetanother((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt.test_unregister_hit_clears_empty_subcomponentss$   cCsH|j}|jdgdd|j|jdgddddS(NR7(R*t unsubscribeR>R0R:(RR.((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyttest_unsubscribe_emptys c Cst\ }}}}}}}}} |j} t} | j|gd| | j|gd| |jt| jddS(Ni( RR*R$t subscribeR>RPR0R;t _subscribers( RR R R R RRRRRR.R((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyttest_unsubscribe_hits $  c Cst\ }}}}}}}}} |j} t} t} t} | j|gd| | j|gd| | j|g|| | j|g|| | j|gd| | j|gd| |jt| jddS(Ni( RR*R$RRR>RPR0R;RS(RR R R R RRRRRR.tfirsttsecondtthird((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyttest_unsubscribe_after_multiples$    c Cst\ }}}}}}}}} |j} t} t} t} | j|gd| | j|gd| | j|gd|jt| jddS(Ni( RR*R$RRR>RPR0R;RS(RR R R R RRRRRR.RURVRW((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt&test_unsubscribe_w_None_after_multiples$    c Cst\ }}}}}}}}} |j} | j|gdd|jt| jd| j|gdd|jt| jddS(NR8iR7(RR*RRR>R0R;RSRP( RR R R R RRRRRR.((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt+test_unsubscribe_non_empty_miss_on_requireds $ c Cst\ }}}}}}}}} |j} | j|gdd|jt| jd| j|gdd|jt| jddS(NR8itA2(RR*RRR>R0R;RSRP( RR R R R RRRRRR.((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt(test_unsubscribe_non_empty_miss_on_values $ c Cst\ }}}}}}}}} |j} t} t} | j|gd| | j|gd| |jt| jddS(Ni( RR*R$RRR>RPR0R;RS( RR R R R RRRRRR.RRK((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt)test_unsubscribe_with_value_not_None_misss$   (RRR)R*R/R2R3R6R=R?RBRCRDRERGRHRJRLRORQRTRXRYRZR\R](((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyR0s0                   tLookupBaseFallbackTestscBseZdZddddZdZdZdZdZdZ dZ dZ d Z d Z d Zd Zd ZdZdZdZdZdZdZdZdZdZdZRS(cCsddlm}|S(Ni(tLookupBaseFallback(R%R_(RR_((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyR)scswdkrdndkr0dndkrHdnd|jffdY}|S(NcSsdS(N((RtrequiredRR(((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt uc_lookupscSsdS(N((RR`R((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt uc_lookupAllscSsdS(N((RR`R((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pytuc_subscriptionsstDerivedcseZZZZRS((RRt_uncached_lookupt_uncached_lookupAllt_uncached_subscriptions((RaRbRc(sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRds(R>R)(RRaRbRcRd((RaRbRcsE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyR*s      (csfgfd}|jd|}|jddd}|j|dk|jdgdS( Ncsj|||fdS(N(tappendR>(RR`RR((t _called_with(sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt_lookup sRatAtBtC(Rk(Rk((RkRlRm(R*tlookupRR>R0(RRjtlbtfound((RisE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyttest_lookup_miss_no_defaults csrgt}fd}|jd|}|jddd|}|j||k|jdgdS( Ncsj|||fdS(N(RhR>(RR`RR((Ri(sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRjsRaRkRlRm(Rk(Rk((RkRlRm(R$R*RnRR0(Rt_defaultRjRoRp((RisE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyttest_lookup_miss_w_defaults csgttt}}}|||gfd}|jd|}|jddd}|j||k|jdg|j||gdS( Ncs#j|||fjdS(Ni(Rhtpop(RR`RR((Rit_results(sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRj!sRaRkRlRm(Rk(Rk((RkRlRm(R$R*RnRR0(RtatbtcRjRoRp((RiRusE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyttest_lookup_not_cachedscsgttt}}}|||gfd}|jd|}|jddd}|jddd}|j||k|jd g|j||gdS( Ncs#j|||fjdS(Ni(RhRt(RR`RR((RiRu(sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRj.sRaRkRlRm(Rk(Rk(Rk((RkRlRm(R$R*RnRR0(RRvRwRxRjRoRp((RiRusE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyttest_lookup_cached*scsgttt}}}|||gfd}|jd|}|jddd}|j||k|jd g|j||gdS( Ncs#j|||fjdS(Ni(RhRt(RR`RR((RiRu(sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRj<sRaRktDRlRm(RkR{(RkR{((RkR{RlRm(R$R*RnRR0(RRvRwRxRjRoRp((RiRusE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt%test_lookup_not_cached_multi_required8scsgttt}}}|||gfd}|jd|}|jddd}|jddd}|j||k|jd g|j||gdS( Ncs#j|||fjdS(Ni(RhRt(RR`RR((RiRu(sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRjIsRaRkR{RlRm(RkR{(RkR{(RkR{((RkR{RlRm(R$R*RnRR0(RRvRwRxRjRoRp((RiRusE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt!test_lookup_cached_multi_requiredEscsgttt}}}|||gfd}|jd|}|jddd}|j||jddd}|j||k|jd d g|j|gdS( Ncs#j|||fjdS(Ni(RhRt(RR`RR((RiRu(sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRjWsRaRkRlRm(Rk(Rk(Rk((RkRlRm(Rk((RkRlRm(R$R*RnRRR0(RRvRwRxRjRoRp((RiRusE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt$test_lookup_not_cached_after_changedSs   csfgfd}|jd|}|jddd}|j|dk|jdgdS(Ncsj|||fdS(N(RhR>(RR`RR((Ri(sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRjesRaRkRlRm(Rk((RkRlRm(R*tlookup1RR>R0(RRjRoRp((RisE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyttest_lookup1_miss_no_defaultcs csrgt}fd}|jd|}|jddd|}|j||k|jdgdS(Ncsj|||fdS(N(RhR>(RR`RR((Ri(sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRjpsRaRkRlRm(Rk((RkRlRm(R$R*RRR0(RRrRjRoRp((RisE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyttest_lookup1_miss_w_defaultms csgt}fd}|jd|}|jddd|}|j||k|jddd|}|j||k|jdgdS(Ncsj|||fdS(N(RhR>(RR`RR((Ri(sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRj{sRaRkRlRm(Rk((RkRlRm(R$R*RRR0(RRrRjRoRp((RisE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt*test_lookup1_miss_w_default_negative_cachexs csgttt}}}|||gfd}|jd|}|jddd}|j||k|jdg|j||gdS(Ncs#j|||fjdS(Ni(RhRt(RR`RR((RiRu(sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRjsRaRkRlRm(Rk((RkRlRm(R$R*RRR0(RRvRwRxRjRoRp((RiRusE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyttest_lookup1_not_cachedscsgttt}}}|||gfd}|jd|}|jddd}|jddd}|j||k|jdg|j||gdS(Ncs#j|||fjdS(Ni(RhRt(RR`RR((RiRu(sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRjsRaRkRlRm(Rk((RkRlRm(R$R*RRR0(RRvRwRxRjRoRp((RiRusE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyttest_lookup1_cachedscsgttt}}}|||gfd}|jd|}|jddd}|j||jddd}|j||k|jdd g|j|gdS( Ncs#j|||fjdS(Ni(RhRt(RR`RR((RiRu(sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRjsRaRkRlRm(Rk((RkRlRm(Rk((RkRlRm(R$R*RRRR0(RRvRwRxRjRoRp((RiRusE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt%test_lookup1_not_cached_after_changeds   cCsKtt}}|j}|j||d}|j|dkdS(NR7(R$R*t adapter_hookRR>(RtreqtprvRoRp((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt!test_adapter_hook_miss_no_defaults cCsXttt}}}|j}|j||d|}|j||kdS(NR7(R$R*RR(RRRRrRoRp((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt test_adapter_hook_miss_w_defaults csgfdfd}ttt}}}|jd|}|j||d|}|j||k|j|gdS(Ncsj|dS(N(RhR>(tcontext(t_f_called_with(sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt_factorys csS(N((RR`RR((R(sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRjsRaRm(R$R*RRR0(RRjRRRrRotadapted((RRsE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt*test_adapter_hook_hit_factory_returns_Nonescsgtfdfd}ttt}}}|jd|}|j||d|}|j|k|j|gdS(Ncsj|S(N(Rh(R(t_adapterR(sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRs csS(N((RR`RR((R(sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRjsRaRm(R$R*RRR0(RRjRRRrRoR((RRRsE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt-test_adapter_hook_hit_factory_returns_adapters csgtfdfd}ttt}}}|jd|}|j||d|}|j|k|j|gdS(Ncsj|S(N(Rh(R(RR(sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRs csS(N((RR`RR((R(sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRjsRaRm(R$R*t queryAdapterRR0(RRjRRRrRoR((RRRsE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyttest_queryAdapters csgtttgfd}|jd|}|jdd}|j|t|jdgdS(Ncsj||ftS(N(RhR!(RR`R(RiRu(sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt _lookupAllsRbRkRl(Rk((RkRl(R$R*t lookupAllR0R!(RRRoRp((RiRusE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyttest_lookupAll_uncachedscsgtttgfd}|jd|}|jdd}|jdd}|j|t|jdgdS(Ncsj||ftS(N(RhR!(RR`R(RiRu(sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRsRbRkRl(Rk((RkRl(R$R*RR0R!(RRRoRp((RiRusE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyttest_lookupAll_cachedscsgtttgfd}|jd|}|jdd}|j|t|jdgdS(Ncsj||ftS(N(RhR!(RR`R(RiRu(sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt_subscriptionssRcRkRl(Rk((RkRl(R$R*t subscriptionsR0R!(RRRoRp((RiRusE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyttest_subscriptions_uncachedscsgtttgfd}|jd|}|jdd}|jdd}|j|t|jdgdS(Ncsj||ftS(N(RhR!(RR`R(RiRu(sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyR sRcRkRl(Rk((RkRl(R$R*RR0R!(RRRoRp((RiRusE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyttest_subscriptions_cachedsN(RRR)R>R*RqRsRyRzR|R}R~RRRRRRRRRRRRRRR(((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyR^s2            tLookupBaseTestscBseZdZRS(cCsddlm}|S(Ni(t LookupBase(R%R(RR((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyR)s(RRR)(((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRstVerifyingBaseFallbackTestscBsbeZdZd d d dZdZdZdZdZdZ dZ dZ RS( cCsddlm}|S(Ni(tVerifyingBaseFallback(R%R(RR((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyR)scsdkrdndkr0dndkrHdnd|jffdY|}|j||S(NcSsdS(N((RR`RR(((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRa$scSsdS(N((RR`R((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRb'scSsdS(N((RR`R((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRc*sRdcs)eZZZZfdZRS(cs t|j||_dS(N(tsuperRt _registry(RR.(Rd(sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyR0s(RRReRfRgR((RdRaRbRc(sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRd,s(R>R)R(RR.RaRbRctderived((RdRaRbRcsE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyR*!s      +  cs9dtfdYddfdY}||S(NtWithGenerationcBseZdZRS(i(RRR1(((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyR8stRegistrycseZfdZRS(cs)gt|D]}^q |_dS(N(trangetro(Rtdepthti(R(sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyR;s(RRR((R(sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyR:s((R$(RRR((RsE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt _makeRegistry7scs9gttt}}}|||gfd}|jd}|j|d|}|jddd}|jd dd}|j||k|jd g|j||g|jdjd7_|jd dd}|j||k|jddg|j|gdS(Ncs#j|||fjdS(Ni(RhRt(RR`RR((RiRu(sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRjCsiRaRkRlRmi(Rk(Rk(Rk((RkRlRm(Rk(Rk((RkRlRm(Rk((RkRlRm(R$RR*RnRR0RR1(RRvRwRxRjRRoRp((RiRusE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt test_lookup?s"  cs9gttt}}}|||gfd}|jd}|j|d|}|jddd}|jddd}|j||k|jd g|j||g|jdjd7_|jddd}|j||k|jd d g|j|gdS(Ncs#j|||fjdS(Ni(RhRt(RR`RR((RiRu(sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRjXsiRaRkRlRmi(Rk((RkRlRm(Rk((RkRlRm(Rk((RkRlRm(R$RR*RRR0RR1(RRvRwRxRjRRoRp((RiRusE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt test_lookup1Ts"  c sDtttfd}fd}fd}|||gfd}ttt}}}|jd}|j|d|} | j||d|} |j| k| j||d|} |j| k|jdjd7_| j||d|} |j| kdS( NcsS(N((R(Rv(sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt _factory1kscsS(N((R(Rw(sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt _factory2mscsS(N((R(Rx(sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt _factory3oscs jdS(Ni(Rt(RR`RR((t _factories(sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRjrsiRaRmi(R$RR*RRRR1( RRRRRjRRRrRRoR((RRvRwRxsE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyttest_adapter_hookis c sDtttfd}fd}fd}|||gfd}ttt}}}|jd}|j|d|} | j||d|} |j| k| j||d|} |j| k|jdjd7_| j||d|} |j| kdS( NcsS(N((R(Rv(sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRscsS(N((R(Rw(sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRscsS(N((R(Rx(sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRscs jdS(Ni(Rt(RR`RR((R(sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRjsiRaRmi(R$RR*RRRR1R( RRRRRjRRRrRRoR((RRvRwRxsE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRs cstttg}tttg}||gfd}|jd}|j|d|}|jdd}|j|t||jdd}|j|t||jdjd7_|jdd}|j|t|dS(NcstjdS(Ni(R!Rt(RR`R(Ru(sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRsiRbRkRli(R$RR*RR0R!RR1(Rt _results_1t _results_2RRRoRp((RusE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyttest_lookupAlls cstttg}tttg}||gfd}|jd}|j|d|}|jdd}|j|t||jdd}|j|t||jdjd7_|jdd}|j|t|dS(NcstjdS(Ni(R!Rt(RR`R(Ru(sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRsiRcRkRli(R$RR*RR0R!RR1(RRRRRRoRp((RusE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyttest_subscriptionss N( RRR)R>R*RRRRRRR(((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRs        tVerifyingBaseTestscBseZdZRS(cCsddlm}|S(Ni(t VerifyingBase(R%R(RR((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyR)s(RRR)(((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRstAdapterLookupBaseTestscBs(eZdZdZdZdZdZdZdZdZ dZ d Z d Z d Z d Zd ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZ dZ!RS( cCsddlm}|S(Ni(tAdapterLookupBase(R%R(RR((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyR)scCs|j|S(N(R)(RR.((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyR*scGsdddY}|S(Nt SubregistrycBseZdZRS(cSsg|_g|_dS(N(R<RS(R((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRs (RRR(((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRs(((RRR((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt_makeSubregistryscGsdddY}||S(NRcBseZdZRS(cSs||_g|_dS(N(t _providedR(RR((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRs (RRR(((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRs(((RRR((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRscCs2|j}|j|}|j|jidS(N(RR*R0R(RR.talb((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyttest_ctor_empty_registrys cCsddlm}ddlm}|d}|d|}|j||}|j|}|jt|jj t|||g|j|j||g|j|j||g|jt|j|t||gdS(Ni(R (tInterfaceClasstIFootIBar( RR tzope.interface.interfaceRRR*R0tsortedRtkeys(RR RRRR.R((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyttest_ctor_w_registry_provideds cCs^dtfdY}d|j|fdY}|j}||}|j|dS(NtMixincBseZdZRS(cWsdS(N((Rtother((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRs(RRR(((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRsRdcBseZRS((RR(((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRds(R$R)RR(RRRdR.R((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyttest_changed_empty_requireds   cCsdtfdY}d|j|fdY}dtfdY}|t}|t}|j}||}d|j|RRRRP(((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRs  ii( R$R)tFalsetTrueRt _requiredRR0R;RR>(RRRdRtgoneRR.R((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyttest_changed_w_requireds       cCsddlm}ddlm}|d}|d|}|j}|j|}||g|_|j|jt |j j t |||g|j|j ||g|j|j ||g|jt |j |t ||gdS(Ni(R (RRR( RR RRRR*Rtinit_extendorsR0RRR(RR RRRR.R((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt)test_init_extendors_after_registry_update s   cCsddlm}ddlm}|d}|d|}|j}|j|}|j||j||jt|j j t|||g|j|j ||g|j|j ||g|jt|j |t||gdS(Ni(R (RRR( RR RRRR*R R0RRR(RR RRRR.R((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyttest_add_extendors    cCsddlm}ddlm}|d}|d|}|j||}|j|}|j||jt|j j t|||g|j|j |g|j|j ||g|jt|j |t|gdS(Ni(R (RRR( RR RRRR*R#R0RRR(RR RRRR.R((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyttest_remove_extendor-s  cCsddlm}|d}|d|}|j}|j|}|j|f|}|j|d|jt|jd|j |j |jkdS(Ni(RRRi( RRRR*ReR0R>R;RRtweakref(RRRRR.Rtresult((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyttest__uncached_lookup_empty_ro>s  cCsddlm}|d}|d|}|j||}|j}|jj||j|}|j|f|}|j|ddS(Ni(RRR( RRRRRRhR*ReR0R>(RRRRR.tsubrRR((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt test__uncached_lookup_order_missIs  cCsddlm}|d}|d|}|j}|j}iig|_|jj||j|}||_|j |f|}|j |ddS(Ni(RRR( RRRRR<RRhR*R,ReR0R>(RRRRR.RRR((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt$test__uncached_lookup_extendors_missTs    cCsddlm}|d}|d|}|j||}|j}iig|_|jj||j|}||_|j |f|}|j |ddS(Ni(RRR( RRRRR<RRhR*R,ReR0R>(RRRRR.RRR((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt%test__uncached_lookup_components_missas   c Csddlm}|d}|d|}|j||}|j}t}iiii|d6|6|6g|_|jj||j|}||_ |j |f|}|j ||kdS(Ni(RRRR7( RRRRR$R<RRhR*R,ReR( RRRRR.Rt _expectedRR((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt test__uncached_lookup_simple_hitns   ! c Csddlm}ddlm}|d}|d|}||dtfdY}|}|j}|j}iig|_|jj ||j |} | j | _ | |_ t} | j|f|d| } |j| | kdS( Ni(t implementer(RRRtFoocBseZRS((RR(((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRstdefault(tzope.interface.declarationsRRRR$RRR<RRhR*ReRnR,tqueryMultiAdapterR( RRRRRRtfooR.RRRrR((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt"test_queryMultiAdaptor_lookup_misss$         csHddlm}ddlm}|d}|d|}||dtfdY}|}|j||}|j}t} gfd} iiii| d 6|6|6g|_|jj ||j |} | j | _ | |_ t} | j|f|d | } |j| | k|j|gdS( Ni(R(RRRRcBseZRS((RR(((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRscsj|dS(N(RhR>(R(Ri(sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRs R7R(RRRRR$RRR<RRhR*ReRnR,RRR0(RRRRRRRR.RRRRRrR((RisE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt#test_queryMultiAdaptor_factory_misss,     !   c sKddlm}ddlm}|d}|d|}||dtfdY}|}|j||}|j}tgfd} iiii| d 6|6|6g|_|jj ||j |} | j | _ | |_ t} | j|f|d | } |j| k|j|gdS( Ni(R(RRRRcBseZRS((RR(((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRscsj|S(N(Rh(R(RiR(sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRs R7R(RRRRR$RRR<RRhR*ReRnR,RRR0( RRRRRRRR.RRRRrR((RiRsE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt"test_queryMultiAdaptor_factory_hits,     !   cCsddlm}|d}|d|}|j}|j|}|j|f|}|j|d|jt|jd|j|j |jkdS(Ni(RRRi(( RRRR*RfR0R;RRR(RRRRR.RR((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt!test__uncached_lookupAll_empty_ros  cCsddlm}|d}|d|}|j||}|j}|jj||j|}||_|j|f|}|j |ddS(Ni(RRR(( RRRRRRhR*R,RfR0(RRRRR.RRR((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt#test__uncached_lookupAll_order_misss   cCsddlm}|d}|d|}|j}|j}iig|_|jj||j|}||_|j |f|}|j |ddS(Ni(RRR(( RRRRR<RRhR*R,RfR0(RRRRR.RRR((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt'test__uncached_lookupAll_extendors_misss    cCsddlm}|d}|d|}|j||}|j}iig|_|jj||j|}||_|j |f|}|j |ddS(Ni(RRR(( RRRRR<RRhR*R,RfR0(RRRRR.RRR((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt(test__uncached_lookupAll_components_misss   c Csddlm}|d}|d|}|j||}|j}t}t}iiii|d6|d6|6|6g|_|jj||j|}||_ |j |f|} |j t | d|fd|fgdS(Ni(RRRR7tnamed( RRRRR$R<RRhR*R,RfR0R( RRRRR.RRt_namedRR((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt#test__uncached_lookupAll_simple_hits    ( c Csddlm}|d}|d|}|j||}|j}t}t}iiii|d6|d6|6|6g|_|jj||j|}|j |_ ||_ |j |f|} |j t| ddgdS(Ni(RRRR7R(RRRRR$R<RRhR*RfRR,tnamesR0R( RRRRR.RRRRR((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt test_namess    (  cCsddlm}|d}|d|}|j}|j|}|j|f|}|j|g|jt|jd|j|j |jkdS(Ni(RRRi( RRRR*RgR0R;RRR(RRRRR.RR((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt%test__uncached_subscriptions_empty_ro&s  cCsddlm}|d}|d|}|j||}|j}|jj||j|}||_|j|f|}|j |gdS(Ni(RRR( RRRRRRhR*R,RgR0(RRRRR.RRR((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt'test__uncached_subscriptions_order_miss1s   cCsddlm}|d}|d|}|j}|j}iig|_|jj||j|}||_|j |f|}|j |gdS(Ni(RRR( RRRRRSRRhR*R,RgR0(RRRRR.RRR((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt+test__uncached_subscriptions_extendors_miss=s    cCsddlm}|d}|d|}|j||}|j}iig|_|jj||j|}||_|j |f|}|j |gdS(Ni(RRR( RRRRRSRRhR*R,RgR0(RRRRR.RRR((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt,test__uncached_subscriptions_components_missJs   c Csddlm}|d}|d|}|j||}|j}dtfdY}||}}iiii||fd6|6|6g|_|jj||j|} | |_ | j |f|} |j t | t ||gdS(Ni(RRRRcBseZdZRS(cSstS(N(R(RR((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt__lt__^s(RRR(((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyR]sR7( RRRRR$RSRRhR*R,RgR0R( RRRRR.RRt_exp1t_exp2RR((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt'test__uncached_subscriptions_simple_hitWs  ' c seddlm}ddlm}|d}|d|}||dtfdY}|}|j||}|j||}|j}ifd} fd } iiii| | fd 6d6|6g|_|j j ||j |} | j | _ | |_| j|fd} |j| d |ji|gd 6|gd 6dS(Ni(R(RRRRcBseZRS((RR(((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRpscsjdgj|dS(NR(t setdefaultRh(R(t_called(sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRxscsjdgj|dS(NR(RRh(R(R(sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRzsR7RR((RRRRR$RRR>RSRRhR*RgRR,t subscribersR0( RRRRRRRR.RRRRR((RsE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyttest_subscribers_wo_providedks,    '  c sddlm}ddlm}|d}|d|}||dtfdY}|}|j||}|j||}|j}ittfd} fd } iiii| | fd 6|6|6g|_|jj ||j |} | j | _ | |_ | j|f|} |j| g|ji|gd 6|gd 6dS( Ni(R(RRRRcBseZRS((RR(((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRscsjdgj|S(NR(RRh(R(RR(sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRscsjdgj|S(NR(RRh(R(RR(sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRsR7RR(RRRRR$RRRSRRhR*RgRR,RR0( RRRRRRRR.RRRRR((RRRsE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyttest_subscribers_w_provideds.    '  ("RRR)R*RRRRRRRRRRRRRRRRRRRRRRRRRRRRRR(((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRs@                  tAdapterRegistryTestscBs>eZdZdZdZdZdZdZRS(cCsddlm}|S(Ni(tAdapterRegistry(R%R(RR((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyR)scOs|j||S(N(R)(Rtargstkw((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyR*scCs)|j}|jt|jddS(Ni(R*R0R;t_v_subregistries(Rtar((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyttest_ctor_no_basess cCsj|j}|j|g}|jt|jd|jt|jd|j||jkdS(Nii(R*R0R;RR(Rtbasetsub((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyttest_ctor_w_basess  cCs|j}|j}|j|g}|g|_|jt|jd|jt|jd|j||jkdS(Nii(R*R5R0R;RR(RtbeforetafterR((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt,test__setBases_removing_existing_subregistrys   cCs|j}dtfdY}||}}|j||j|t}|j||j|j|k|j|j|kdS(NRdcBseZdZdZRS(cSs ||_dS(N(R(Rtoriginally_changed((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRsN(RRR>RR(((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRds(R*R$t_addSubregistryRRR(RRRdtderived1tderived2R((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyttest_changed_w_subregistriess     (RRR)R*RRR R(((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRs     t Test_utilscBs5eZdZdZdZdZdZRS(cCs=ddlm}ddlm}|j|d|kdS(Ni(t_convert_None_to_Interface(R (R%RRR RR>(RRR ((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt&test__convert_None_to_Interface_w_NonescCs6ddlm}t}|j|||kdS(Ni(R(R%RR$R(RRR((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt'test__convert_None_to_Interface_w_others cCswddl}ddlm}d}|jddkrT|j||t|n|j||t|ddS(Ni(t_normalize_nametstriitascii(tsysR%Rt version_infoR0tunicodeR(RRRtSTR((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyttest__normalize_name_strs  cCsFddlm}ddlm}|d}|j|||dS(Ni(R(t_utustr(R%Rtzope.interface._compatRR0(RRRtUSTR((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyttest__normalize_name_unicodes cCsMddlm}x6dddgitfD]}|jt||q,WdS(Ni(Rig?((R%RR$t assertRaisest TypeError(RRR((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyttest__normalize_name_others"(RRRRRR!R$(((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyRs    c Csmtjtjttjttjttjttjttjttjt tjt fS(N( tunittestt TestSuitet makeSuiteRR^RRRRRR(((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyt test_suites       (t__doc__R%tTestCaseRRRR^RRRRRRR((((sE/usr/lib/python2.7/dist-packages/zope/interface/tests/test_adapter.pyts  $.$