
    (ph׷                       S r SSKrSSKJr  SSKJr  SSKJr   " S S\R                  5      r	 " S S	\	5      r
 " S
 S\R                  5      r " S S\R                  5      r " S S\R                  5      r " S S\R                  5      r " S S\5      r " S S\5      r " S S\\5      r " S S\\5      r " S S\R                  5      r " S S\5      r " S S\5      r " S  S!5      rg)"zComponent Registry Tests    N	Interface)VerifyingAdapterRegistry
Componentsc                     ^  \ rS rSrS rSuS jrS rS rS rS r	S r
S	 rS
 rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS r S r!S  r"S! r#S" r$S# r%S$ r&S% r'S& r(S' r)S( r*S) r+S* r,S+ r-S, r.S- r/S. r0S/ r1S0 r2S1 r3S2 r4S3 r5S4 r6S5 r7S6 r8S7 r9S8 r:S9 r;S: r<S; r=S< r>S= r?S> r@S? rAS@ rBSA rCSB rDSC rESD rFSE rGSF rHU 4SG jrIU 4SH jrJSI rKSJ rLSK rMSL rNSM rOSN rPU 4SO jrQSP rRSQ rSSR rTSS rUST rVSU rWSV rXSW rYSX rZSY r[SZ r\S[ r]S\ r^S] r_S^ r`S_ raS` rbSa rcSb rdSc reSd rfSe rgSf rhSg riSh rjSi rkSj rlSk rmSl rnSm roSn rpSo rqSp rr SvSq jrsSr rtSs ruStrvU =rw$ )wComponentsTests   c                     [         $ Nr   selfs    U/var/www/html/venv/lib/python3.13/site-packages/zope/interface/tests/test_registry.py_getTargetClassComponentsTests._getTargetClass   s        c                 6    U R                  5       " U/UQ70 UD6$ r   r   )r   nameargskws       r   _makeOneComponentsTests._makeOne   s     ##%d8T8R88r   c                 :   ^ SSK Jn  / mU4S jn[        XS9nUT4$ )Nr   )registryc                  *   > TR                  X45        g r   append)r   r   _eventss     r   _notify,ComponentsTests._wrapEvents.<locals>._notify#   s    NND:&r   )notify)zope.interfacer   _Monkey)r   r   r    _monkeyr   s       @r   _wrapEventsComponentsTests._wrapEvents   s'    +	' (3r   c                    SSK Jn  U R                  S5      nU R                  UR                  S5        U R                  UR
                  S5        U R                  UR                  U5        U R                  UR                  U5        U R                  UR                  R
                  S5        U R                  UR                  R
                  S5        U R                  UR                  0 5        U R                  UR                  0 5        U R                  UR                  / 5        U R                  UR                  / 5        g )Nr   )AdapterRegistrytesting )zope.interface.adapterr)   r   assertEqual__name__	__bases__assertIsInstanceadapters	utilities_utility_registrations_adapter_registrations_subscription_registrations_handler_registrations)r   r)   comps      r   test_ctor_no_bases"ComponentsTests.test_ctor_no_bases)   s    :}}Y'	2,dmm_=dnno>00"5112644b944b9992>44b9r   c                    U R                  S5      nU R                  SU45      nU R                  UR                  S5        U R                  UR                  U45        U R                  UR                  R                  UR                  45        U R                  UR
                  R                  UR
                  45        g )Nbaser*   )r   r-   r.   r/   r1   r2   )r   r;   r7   s      r   test_ctor_w_base ComponentsTests.test_ctor_w_base7   s    }}V$}}Y0	2$1004==2BC11DNN3DEr   c                 \    U R                  S5      nU R                  [        U5      S5        g )Nr*   z<Components testing>r   r-   reprr   r7   s     r   test___repr__ComponentsTests.test___repr__?   s%    }}Y'd%;<r   c                    U R                  S5      nU R                  S5      nU R                  5       nX4Ul        U R                  UR                  X45        U R                  UR                  R                  UR                  UR                  45        U R                  UR                  R                  UR                  UR                  45        g )Nbase1base2)r   r/   r-   r1   r2   )r   rE   rF   r7   s       r   test_assign_to___bases__(ComponentsTests.test_assign_to___bases__E   s    g&g&}}%800..%..9	;11//5??;	=r   c                    SSK Jn  SSK Jn   " S SU5      nU" S5      nU" S5       " S S5      5       nU" 5       nS	nU R                  5       nUR	                  XdUS
9  U R                  UR                  US4   XgS 45        g )Nr   InterfaceClassnamedc                       \ rS rSrSrg)FComponentsTests.test_registerUtility_with_component_name.<locals>.IFooT   r+   Nr.   
__module____qualname____firstlineno____static_attributes__r+   r   r   IFoorO   T       r   rV   fooc                       \ rS rSrSrg)EComponentsTests.test_registerUtility_with_component_name.<locals>.FooY   r+   NrQ   r+   r   r   FoorZ   Y       r   r\   infor^   )zope.interface.declarationsrK   rM   r   registerUtilityr-   r3   )	r   rK   rM   rV   ifoor\   rX   _infor7   s	            r   (test_registerUtility_with_component_name8ComponentsTests.test_registerUtility_with_component_nameP   s    >5	> 	 F|	u	 	 
	 e}}SU3''e4	 r   c                 |    S n[        5       nU R                  5       nU R                  [        UR                  X!S9  g )Nc                      [        5       er   NotImplementedErrorr+   r   r   _factoryQComponentsTests.test_registerUtility_both_factory_and_component.<locals>._factoryg       %''r   	componentfactory)objectr   assertRaises	TypeErrorra   r   rj   _to_regr7   s       r   /test_registerUtility_both_factory_and_component?ComponentsTests.test_registerUtility_both_factory_and_componentf   s9    	((}})T%9%9$+ 	 	?r   c                    SSK Jn  SSKJn  SSKJn   " S SU5      nU" S5      nSnSn[        5       nU R                  5       n	U R                  5       u  pU
   U	R                  XXv5        S S S 5        U R                  U	R                  R                  S   U   U   U5        U R                  U	R                  XW4   XS 45        U R                  U	R                  R                  S   U   S	   U45        U R                  [!        U5      S
5        US   u  pUu  nU R                  U0 5        U R#                  X5        U R#                  UR                  U5        U R                  UR                  R$                  U	5        U R                  UR                  R&                  U5        U R                  UR                  R(                  U5        U R                  UR                  R*                  U5        U R                  UR                  R,                  U5        U R/                  UR                  R0                  5        g ! , (       d  f       GN= f)Nr   rJ   
RegisteredUtilityRegistrationc                       \ rS rSrSrg)>ComponentsTests.test_registerUtility_w_component.<locals>.IFoos   r+   NrQ   r+   r   r   rV   r}   s   rW   r   rV   r^   r       )r`   rK   zope.interface.interfacesry   zope.interface.registryr{   rp   r   r&   ra   assertIsr2   	_adaptersr-   r3   _subscriberslenr0   r   providedr   rn   r^   assertIsNonero   )r   rK   ry   r{   rV   rb   rc   _namert   r7   r%   r   r   r   events                  r    test_registerUtility_w_component0ComponentsTests.test_registerUtility_w_componentn   s   >8?	> 	 F|(}}++-  = dnn..q1$7>H44T[A!$/	144Q7=bAG:NWq)1:R e0ell,?@ell++T2ell++T2ell''/ell,,g6ell''/%,,../# Ws   H==
Ic           	        ^ SSK Jn  SSKJn  SSKJn   " S SU5      nU" S5      nSnSn[        5       mU4S	 jnU R                  5       n	U R                  5       u  pU
   U	R                  S XWXhS
9  S S S 5        U R                  [        U5      S5        US   u  pUu  nU R                  U0 5        U R                  X5        U R                  UR                  U5        U R                  UR                  R                  U	5        U R                  UR                  R                  U5        U R                  UR                  R                   U5        U R                  UR                  R"                  T5        U R                  UR                  R$                  U5        U R                  UR                  R&                  U5        g ! , (       d  f       GNY= f)Nr   rJ   rx   rz   c                       \ rS rSrSrg)<ComponentsTests.test_registerUtility_w_factory.<locals>.IFoo   r+   NrQ   r+   r   r   rV   r      rW   r   rV   r^   r   c                     > T $ r   r+   rt   s   r   rj   @ComponentsTests.test_registerUtility_w_factory.<locals>._factory       Nr   ro   r   )r`   rK   r   ry   r   r{   rp   r   r&   ra   r-   r   r0   r   r   r   r   rn   r^   ro   )r   rK   ry   r{   rV   rb   rc   r   rj   r7   r%   r   r   r   r   rt   s                  @r   test_registerUtility_w_factory.ComponentsTests.test_registerUtility_w_factory   se   >8?	> 	 F|(	 }}++-  tE L Wq)1:R e0ell,?@ell++T2ell++T2ell''/ell,,g6ell''/ell**H5 Ws   G
Gc                      " S S5      nSnSnU" 5       nU R                  5       nU R                  [        UR                  US X25        g )Nc                       \ rS rSrSrg)GComponentsTests.test_registerUtility_no_provided_available.<locals>.Foo   r+   NrQ   r+   r   r   r\   r      rW   r   r\   r^   r   )r   rq   rr   ra   )r   r\   rc   r   rt   r7   s         r   *test_registerUtility_no_provided_available:ComponentsTests.test_registerUtility_no_provided_available   sJ    	 	 %}})..u	Mr   c                    SSK Jn  SSK Jn  SSKJn  SSKJn   " S SU5      n " S S	5      nU" S5      nS
nSn	U" 5       n
U" X5        U R                  5       nU R                  5       u  pU   UR                  U
S X5        S S S 5        U R                  [        U5      S5        US   u  pUu  nU R                  U0 5        U R                  UU5        U R                  UR                  U5        U R                  UR                  R                  U5        U R                  UR                  R                   U5        U R                  UR                  R"                  U	5        U R                  UR                  R$                  U
5        U R                  UR                  R&                  U5        U R)                  UR                  R*                  5        g ! , (       d  f       GNY= f)Nr   rJ   directlyProvidesrx   rz   c                       \ rS rSrSrg)>ComponentsTests.test_registerUtility_wo_provided.<locals>.IFoo   r+   NrQ   r+   r   r   rV   r      rW   r   rV   c                       \ rS rSrSrg)=ComponentsTests.test_registerUtility_wo_provided.<locals>.Foo   r+   NrQ   r+   r   r   r\   r      rW   r   r\   r^   r   r   )r`   rK   r   r   ry   r   r{   r   r&   ra   r-   r   r0   rp   r   r   r   r   rn   r^   r   ro   )r   rK   r   ry   r{   rV   r\   rb   rc   r   rt   r7   r%   r   r   r   r   s                    r    test_registerUtility_wo_provided0ComponentsTests.test_registerUtility_wo_provided   sq   >@8?	> 		 	 F|%'}}++-  $= Wq)1:R eZ0ell,?@ell++T2ell++T2ell''/ell,,g6ell''/%,,../ Ws   -G
G"c                 L   SSK Jn   " S SU5      nU" S5      nSnSn[        5       nU R                  5       nUR	                  XcXT5        U R                  5       u  pU   UR	                  XcXT5        S S S 5        U R                  [        U	5      S5        g ! , (       d  f       N*= f)Nr   rJ   c                       \ rS rSrSrg)JComponentsTests.test_registerUtility_duplicates_existing_reg.<locals>.IFoo   r+   NrQ   r+   r   r   rV   r      rW   r   rV   r^   r   )r`   rK   rp   r   ra   r&   r-   r   
r   rK   rV   rb   rc   r   rt   r7   r%   r   s
             r   ,test_registerUtility_duplicates_existing_reg<ComponentsTests.test_registerUtility_duplicates_existing_reg   s    >	> 	 F|(}}WE9++-  = Wq) Ws   B
B#c                    SSK Jn   " S SU5      nU" S5      nSnSnSn[        5       nU R                  5       nUR	                  XsXd5        U R                  5       u  pU	   UR	                  XsXe5        S S S 5        U R                  [        U
5      S5        U R                  UR                  X64   XuS 45        U R                  UR                  R                  S   U   S	   U45        g ! , (       d  f       N|= f)
Nr   rJ   c                       \ rS rSrSrg)CComponentsTests.test_registerUtility_w_different_info.<locals>.IFoo   r+   NrQ   r+   r   r   rV   r      rW   r   rV   info1info2r      r   r`   rK   rp   r   ra   r&   r-   r   r3   r2   r   )r   rK   rV   rb   _info1_info2r   rt   r7   r%   r   s              r   %test_registerUtility_w_different_info5ComponentsTests.test_registerUtility_w_different_info   s    >	> 	 F|(}}WE:++-  > Wq)44d]C!40	244Q7=bA!	% Ws    C))
C7c                 L   SSK Jn   " S SU5      nU" S5      nSnSnSn[        5       n[        5       nU R                  5       n	U	R	                  XsXT5        U R                  5       u  pU
   U	R	                  XXd5        S S S 5        U R                  [        U5      S5        U R                  U	R                  X54   XtS 45        U R                  U	R                  X64   XS 45        U R                  U	R                  R                  S   U   S	   Xx45        g ! , (       d  f       N= f)
Nr   rJ   c                       \ rS rSrSrg)SComponentsTests.test_registerUtility_w_different_names_same_component.<locals>.IFooi  r+   NrQ   r+   r   r   rV   r     rW   r   rV   r^   name1name2r   r   r   r   rK   rV   rb   rc   _name1_name2
_other_regrt   r7   r%   r   s               r   5test_registerUtility_w_different_names_same_componentEComponentsTests.test_registerUtility_w_different_names_same_component  s   >	> 	 F|X
(}}Zv=++-  > Wq)44d^D$T2	444d^D!$/	144Q7=bA$/	1 Ws   *D
D#c                 <   SSK Jn  SSKJn  SSKJn  SSKJn   " S SU5      nU" S5      nSnS	n[        5       [        5       pU R                  5       nUR                  XX5        U R                  5       u  pU   UR                  XX5        S S S 5        U R                  [        U5      S
5        US   u  pUu  nU R                  U0 5        U R                  UU5        U R                  UR                  U5        U R                  UR                  R                  U5        U R                  UR                  R                   U5        U R                  UR                  R"                  U5        U R                  UR                  R$                  U	5        U R                  UR                  R&                  U5        U R)                  UR                  R*                  5        US   u  pUu  nU R                  U0 5        U R                  UU5        U R                  UR                  U5        U R                  UR                  R                  U5        U R                  UR                  R                   U5        U R                  UR                  R"                  U5        U R                  UR                  R$                  U
5        U R                  UR                  R&                  U5        U R)                  UR                  R*                  5        g ! , (       d  f       GN= f)Nr   rJ   rx   Unregisteredrz   c                       \ rS rSrSrg)HComponentsTests.test_registerUtility_replaces_existing_reg.<locals>.IFooi$  r+   NrQ   r+   r   r   rV   r   $  rW   r   rV   r^   r   r   r   )r`   rK   r   ry   r   r   r{   rp   r   ra   r&   r-   r   r0   r   r   r   r   rn   r^   r   ro   )r   rK   ry   r   r{   rV   rb   rc   r   _before_afterr7   r%   r   r   r   r   s                    r   *test_registerUtility_replaces_existing_reg:ComponentsTests.test_registerUtility_replaces_existing_reg  sH   >8:?	> 	 F| (FH}}WE9++-  u< Wq)1:R e\2ell,?@ell++T2ell++T2ell''/ell,,g6ell''/%,,../1:R eZ0ell,?@ell++T2ell++T2ell''/ell,,f5ell''/%,,../1 Ws   9L
Lc                 z   SSK Jn   " S SU5      nU" S5      nSnSnSn[        5       nU R                  5       nUR	                  XsXT5        U R                  5       u  pU	   UR	                  XsXd5        S S S 5        U R                  UR                  R                  S   U   S   U45        g ! , (       d  f       N?= f)	Nr   rJ   c                       \ rS rSrSrg)DComponentsTests.test_registerUtility_w_existing_subscr.<locals>.IFooiK  r+   NrQ   r+   r   r   rV   r   K  rW   r   rV   r^   r   r   r   )	r`   rK   rp   r   ra   r&   r-   r2   r   r   rK   rV   rb   rc   r   r   rt   r7   r%   r   s              r   &test_registerUtility_w_existing_subscr6ComponentsTests.test_registerUtility_w_existing_subscrH  s    >	> 	 F|(}}WF:++-  > 44Q7=bAG:N Ws    B,,
B:c                 *   SSK Jn   " S SU5      nU" S5      nSnSn[        5       nU R                  5       nU R	                  5       u  pU   UR                  XcXTS5        S S S 5        U R                  [        U	5      S5        g ! , (       d  f       N*= f)Nr   rJ   c                       \ rS rSrSrg);ComponentsTests.test_registerUtility_wo_event.<locals>.IFooi]  r+   NrQ   r+   r   r   rV   r   ]  rW   r   rV   r^   r   F)r`   rK   rp   r   r&   ra   r-   r   r   s
             r   test_registerUtility_wo_event-ComponentsTests.test_registerUtility_wo_eventZ  s    >	> 	 F|(}}++-  eD Wq) Ws   B
Bc                     " S SU R                  5       5      nU" 5       nUR                  [        5       [        5        U R	                  [        [        UR                  5       5      5      S5         " S S[        5      nUR                  [        5       U5        U R	                  [        [        UR                  5       5      5      S5        g )Nc                   ,   ^  \ rS rSrSrU 4S jrSrU =r$ )dComponentsTests.test_registerUtility_changes_object_identity_after.<locals>.CompThatChangesAfter1Regim  r   c                    > U =R                   S-  sl         [        TU ]  " U6   U R                   S:X  a  [        U R                  5      U l        g g )Nr   )	reg_countsuperra   dictr3   r   r   	__class__s     r   ra   tComponentsTests.test_registerUtility_changes_object_identity_after.<locals>.CompThatChangesAfter1Reg.registerUtilityp  sE    !#'.>>Q&26333D/ 'r   r3   r.   rR   rS   rT   r   ra   rU   __classcell__r   s   @r   CompThatChangesAfter1Regr   m  s    I r   r   r   c                       \ rS rSrSrg)PComponentsTests.test_registerUtility_changes_object_identity_after.<locals>.IFooi}  r+   NrQ   r+   r   r   rV   r   }  rW   r   rV   r   r   ra   rp   r   r-   r   listregisteredUtilities)r   r   r7   rV   s       r   2test_registerUtility_changes_object_identity_afterBComponentsTests.test_registerUtility_changes_object_identity_afterj  s    		t';';'= 		 ()VXy1T$":":"<=>B	9 	 	VXt,T$":":"<=>Br   c                 P    " S SU R                  5       5      nU" 5       nUR                  [        5       [        5        U R	                  [        [        UR                  5       5      5      S5         " S S[        5      nUR                  [        5       U5        U R	                  [        [        UR                  5       5      5      S5         " S S[        5      nUR                  [        5       U5        U R	                  [        [        UR                  5       5      5      S	5        g )
Nc                   ,   ^  \ rS rSrSrU 4S jrSrU =r$ )eComponentsTests.test_registerUtility_changes_object_identity_before.<locals>.CompThatChangesAfter2Regi  r   c                    > U =R                   S-  sl         U R                   S:X  a  [        U R                  5      U l        [        TU ]  " U6   g )Nr   r   )r   r   r3   r   ra   r   s     r   ra   uComponentsTests.test_registerUtility_changes_object_identity_before.<locals>.CompThatChangesAfter2Reg.registerUtility  sB    !#>>Q&26333D/ '.r   r   r   r   s   @r   CompThatChangesAfter2Regr     s    I/ /r   r   r   c                       \ rS rSrSrg)QComponentsTests.test_registerUtility_changes_object_identity_before.<locals>.IFooi  r+   NrQ   r+   r   r   rV   r     rW   r   rV   r   c                       \ rS rSrSrg)QComponentsTests.test_registerUtility_changes_object_identity_before.<locals>.IBari  r+   NrQ   r+   r   r   IBarr     rW   r   r      r   )r   r   r7   rV   r   s        r   3test_registerUtility_changes_object_identity_beforeCComponentsTests.test_registerUtility_changes_object_identity_before  s    
	/t';';'= 
	/ ()VXy1T$":":"<=>B	9 	 	VXt,T$":":"<=>B	9 	 	VXt,T$":":"<=>Br   c                 f    U R                  5       nU R                  [        UR                  S S S S9  g )N)rn   r   ro   )r   rq   rr   unregisterUtilityrA   s     r   <test_unregisterUtility_wo_factory_nor_component_nor_providedLComponentsTests.test_unregisterUtility_wo_factory_nor_component_nor_provided  s2    }})T%;%;$(4 	 	Gr   c                 |    S n[        5       nU R                  5       nU R                  [        UR                  X!S9  g )Nc                      [        5       er   rh   r+   r   r   rj   SComponentsTests.test_unregisterUtility_both_factory_and_component.<locals>._factory  rl   r   rm   )rp   r   rq   rr   r   rs   s       r   1test_unregisterUtility_both_factory_and_componentAComponentsTests.test_unregisterUtility_both_factory_and_component  s9    	((}})T%;%;$+ 	 	?r   c                 2   SSK Jn   " S SU5      nU" S5      nSn[        5       nU R                  5       nU R	                  5       u  pxU   UR                  XSU5      n	S S S 5        U R                  W	5        U R                  U5        g ! , (       d  f       N1= f)Nr   rJ   c                       \ rS rSrSrg)EComponentsTests.test_unregisterUtility_w_component_miss.<locals>.IFooi  r+   NrQ   r+   r   r   rV   r
    rW   r   rV   r   )r`   rK   rp   r   r&   r   assertFalse)
r   rK   rV   rb   r   rt   r7   r%   r   unregs
             r   'test_unregisterUtility_w_component_miss7ComponentsTests.test_unregisterUtility_w_component_miss  s    >	> 	 F|(}}++-**7%@E ! Ws   
B
Bc                 `   SSK Jn  SSKJn  SSKJn   " S SU5      nU" S5      nSn[        5       nU R                  5       nUR                  XuU5        U R                  5       u  pU	   UR                  XuU5      nS S S 5        U R                  W5        U R                  UR                  R                  5        U R                  XV4UR                   5        U R                  UR                  R"                  5        U R%                  ['        U
5      S5        U
S   u  pUu  nU R%                  U0 5        U R)                  X5        U R)                  UR                  U5        U R+                  UR                  R,                  U5        U R+                  UR                  R.                  U5        U R+                  UR                  R0                  U5        U R+                  UR                  R2                  U5        U R5                  UR                  R6                  5        g ! , (       d  f       GN= f)	Nr   rJ   r   rz   c                       \ rS rSrSrg)@ComponentsTests.test_unregisterUtility_w_component.<locals>.IFooi  r+   NrQ   r+   r   r   rV   r    rW   r   rV   r   r   )r`   rK   r   r   r   r{   rp   r   ra   r&   r   
assertTruer  r2   r   assertNotInr3   r   r-   r   r0   r   r   r   r   rn   r   ro   )r   rK   r   r{   rV   rb   r   rt   r7   r%   r   r  r   r   r   s                  r   "test_unregisterUtility_w_component2ComponentsTests.test_unregisterUtility_w_component  s   >:?	> 	 F|(}}WE2++-**7%@E 112$(C(CD445Wq)1:R e2ell,?@ell++T2ell++T2ell''/ell,,g6%,,../! Ws   (H
H-c                   ^ SSK Jn  SSKJn  SSKJn   " S SU5      nU" S5      nSnSn[        5       mU4S	 jnU R                  5       n	U	R                  S XWXhS
9  U R                  5       u  pU
   U	R                  S XWUS
9nS S S 5        U R                  W5        U R                  [        U5      S5        US   u  pUu  nU R                  U0 5        U R                  X5        U R                  UR                  U5        U R                  UR                  R                   U	5        U R                  UR                  R"                  U5        U R                  UR                  R$                  U5        U R                  UR                  R&                  T5        U R                  UR                  R(                  U5        g ! , (       d  f       GND= f)Nr   rJ   r   rz   c                       \ rS rSrSrg)>ComponentsTests.test_unregisterUtility_w_factory.<locals>.IFooi  r+   NrQ   r+   r   r   rV   r    rW   r   rV   r^   r   c                     > T $ r   r+   r   s   r   rj   BComponentsTests.test_unregisterUtility_w_factory.<locals>._factory  r   r   r   r   )r`   rK   r   r   r   r{   rp   r   ra   r&   r   r  r-   r   r0   r   r   r   r   rn   ro   )r   rK   r   r{   rV   rb   rc   r   rj   r7   r%   r   r  r   r   r   rt   s                   @r    test_unregisterUtility_w_factory0ComponentsTests.test_unregisterUtility_w_factory  sp   >:?	> 	 F|(	 }}T4H++-**4h*OE Wq)1:R e2ell,?@ell++T2ell++T2ell''/ell,,g6ell**H5 Ws   0F??
Gc                    SSK Jn  SSK Jn  SSKJn  SSKJn   " S SU5      n " S S	5      nU" S5      nS
nSn	U" 5       n
U" X5        U R                  5       nUR                  XX5        U R                  5       u  pU   UR                  U
S U	5      nS S S 5        U R                  W5        U R                  [        U5      S5        US   u  nnUu  nU R                  U0 5        U R                  UU5        U R                  UR                  U5        U R!                  UR                  R"                  U5        U R!                  UR                  R$                  U5        U R!                  UR                  R&                  U	5        U R!                  UR                  R(                  U
5        U R!                  UR                  R*                  U5        U R-                  UR                  R.                  5        g ! , (       d  f       GNk= f)Nr   rJ   r   r   rz   c                       \ rS rSrSrg)IComponentsTests.test_unregisterUtility_wo_explicit_provided.<locals>.IFooi  r+   NrQ   r+   r   r   rV   r    rW   r   rV   c                       \ rS rSrSrg)HComponentsTests.test_unregisterUtility_wo_explicit_provided.<locals>.Fooi  r+   NrQ   r+   r   r   r\   r!    rW   r   r\   r^   r   r   r`   rK   r   r   r   r   r{   r   ra   r&   r   r  r-   r   r0   rp   r   r   r   r   rn   r^   r   ro   r   rK   r   r   r{   rV   r\   rb   rc   r   rt   r7   r%   r   r  r   r   r   s                     r   +test_unregisterUtility_wo_explicit_provided;ComponentsTests.test_unregisterUtility_wo_explicit_provided  s   >@:?	> 		 	 F|%'}}WE9++-**7D%@E Wq)1:bR e\2ell,?@ell++T2ell++T2ell''/ell,,g6ell''/%,,../ Ws   ?G77
Hc                 
   SSK Jn  SSK Jn  SSKJn  SSKJn   " S SU5      n " S S	5      nU" S5      nS
nSn	U" 5       n
U" X5        U R                  5       nUR                  XX5        U R                  5       u  pU   UR                  XyS9nS S S 5        U R                  W5        U R                  [        U5      S5        US   u  nnUu  nU R                  U0 5        U R                  UU5        U R                  UR                  U5        U R!                  UR                  R"                  U5        U R!                  UR                  R$                  U5        U R!                  UR                  R&                  U	5        U R!                  UR                  R(                  U
5        U R!                  UR                  R*                  U5        U R-                  UR                  R.                  5        g ! , (       d  f       GNk= f)Nr   rJ   r   r   rz   c                       \ rS rSrSrg)LComponentsTests.test_unregisterUtility_wo_component_or_factory.<locals>.IFooi,  r+   NrQ   r+   r   r   rV   r(  ,  rW   r   rV   c                       \ rS rSrSrg)KComponentsTests.test_unregisterUtility_wo_component_or_factory.<locals>.Fooi/  r+   NrQ   r+   r   r   r\   r*  /  rW   r   r\   r^   r   r   r   r   r"  r#  s                     r   .test_unregisterUtility_wo_component_or_factory>ComponentsTests.test_unregisterUtility_wo_component_or_factory&  s   >@:?	> 		 	 F|%'}}WE9++-**D*EE  	Wq)1:bR e\2ell,?@ell++T2ell++T2ell''/ell,,g6ell''/%,,../ Ws   ?G33
Hc                    SSK Jn   " S SU5      nU" S5      nSnSnSn[        5       nU R                  5       nUR	                  XsXT5        UR	                  XsXd5        U R                  5       u  pU	   UR                  XsU5        S S S 5        U R                  UR                  R                  S   U   S   U45        g ! , (       d  f       N?= f)	Nr   rJ   c                       \ rS rSrSrg)FComponentsTests.test_unregisterUtility_w_existing_subscr.<locals>.IFooiN  r+   NrQ   r+   r   r   rV   r0  N  rW   r   rV   r^   r   r   r   
r`   rK   rp   r   ra   r&   r   r-   r2   r   r   s              r   (test_unregisterUtility_w_existing_subscr8ComponentsTests.test_unregisterUtility_w_existing_subscrK  s    >	> 	 F|(}}WF:WF:++-""7&9 44Q7=bAG:N W   2B>>
Cc                    SSK Jn   " S SU5      nU" S5      nSnSnSn[        5       nU R                  5       nUR	                  XsXT5        UR	                  XsXd5        U R                  5       u  pU	   UR                  XsU5        S S S 5        U R                  UR                  R                  S   U   S   U45        g ! , (       d  f       N?= f)	Nr   rJ   c                       \ rS rSrSrg)SComponentsTests.test_unregisterUtility_w_existing_subscr_non_hashable.<locals>.IFooia  r+   NrQ   r+   r   r   rV   r7  a  rW   r   rV   r^   r   r   r   )
r`   rK   r   r   ra   r&   r   r-   r2   r   r   s              r   5test_unregisterUtility_w_existing_subscr_non_hashableEComponentsTests.test_unregisterUtility_w_existing_subscr_non_hashable^  s    >	> 	 F|&}}WF:WF:++-""7&9 44Q7=bAG:N Wr4  c                    SSK Jn  SSKJn   " S SU5      nU" S5      nSnSnSn[	        5       nU R                  5       n	U	R                  XXe5        U	R                  XXu5        U R                  5       u  pU
   U	R                  XU5        S S S 5        U R                  U	R                  R                  S   U   S	   U45        g ! , (       d  f       N?= f)
Nr   rJ   )_UtilityRegistrationsc                       \ rS rSrSrg)]ComponentsTests.test_unregisterUtility_w_existing_subs_non_hashable_fresh_cache.<locals>.IFooiw  r+   NrQ   r+   r   r   rV   r=  w  rW   r   rV   r^   r   r   r   )r`   rK   r   r;  r   r   ra   r&   r   r-   r2   r   )r   rK   r;  rV   rb   rc   r   r   rt   r7   r%   r   s               r   ?test_unregisterUtility_w_existing_subs_non_hashable_fresh_cacheOComponentsTests.test_unregisterUtility_w_existing_subs_non_hashable_fresh_cacheq  s     	?A	> 	 F|&}}WF:WF:++-""7&9 44Q7=bAG:N Ws   8C
Cc                    SSK Jn   " S SU5      nU" S5      nSnSnSn[        5       nU R                  5       nUR	                  XsXT5        UR	                  XsXd5        UR                  S5        UR	                  XsXd5        U R                  5       u  pU	   UR                  XsU5        S S S 5        U R                  S[        UR                  R                  5      5        g ! , (       d  f       N>= f)	Nr   rJ   c                       \ rS rSrSrg)]ComponentsTests.test_unregisterUtility_w_existing_subscr_non_hashable_reinitted.<locals>.IFooi  r+   NrQ   r+   r   r   rV   rB    rW   r   rV   r^   r   r   r;   )r`   rK   r   r   ra   __init__r&   r   r-   r   r2   r   r   s              r   ?test_unregisterUtility_w_existing_subscr_non_hashable_reinittedOComponentsTests.test_unregisterUtility_w_existing_subscr_non_hashable_reinitted  s     	?	> 	 F|&}}WF:WF: 	fWF:++-""7&9  	C ; ;<= Ws   C  
C.c                    SSK Jn   " S SU5      nU" S5      nSnSnSn[        5       n[        5       nU R                  5       n	U	R	                  XsXT5        U	R	                  XXd5        U R                  5       u  pU
   U	R                  XU5        S S S 5        U R                  U	R                  R                  S   U   S   U45        g ! , (       d  f       N?= f)	Nr   rJ   c                       \ rS rSrSrg)VComponentsTests.test_unregisterUtility_w_existing_subscr_other_component.<locals>.IFooi  r+   NrQ   r+   r   r   rV   rH    rW   r   rV   r^   r   r   r   r1  r   s               r   8test_unregisterUtility_w_existing_subscr_other_componentHComponentsTests.test_unregisterUtility_w_existing_subscr_other_component  s    >	> 	 F|X
(}}Zv=WF:++-""7&9 44Q7=bA$	( W   <C
Cc                    SSK Jn   " S SU5      nU" S5      nSnSnSn[        5       n[        5       nU R	                  5       n	U	R                  XsXT5        U	R                  XXd5        U R                  5       u  pU
   U	R                  XU5        S S S 5        U R                  U	R                  R                  S   U   S   U45        g ! , (       d  f       N?= f)	Nr   rJ   c                       \ rS rSrSrg)[ComponentsTests.test_unregisterUtility_w_existing_subscr_oter_comp_mixed_hash.<locals>.IFooi  r+   NrQ   r+   r   r   rV   rN    rW   r   rV   r^   r   r   r   )r`   rK   rp   r   r   ra   r&   r   r-   r2   r   r   s               r   =test_unregisterUtility_w_existing_subscr_oter_comp_mixed_hashMComponentsTests.test_unregisterUtility_w_existing_subscr_oter_comp_mixed_hash  s    >	> 	 F|X
&}}Zv=WF:++-""7&9 44Q7=bA$	( WrK  c                 v    U R                  5       nU R                  [        UR                  5       5      / 5        g r   )r   r-   r   r   rA   s     r   test_registeredUtilities_empty.ComponentsTests.test_registeredUtilities_empty  s+    }}d66892>r   c                 j   SSK Jn  SSKJn   " S SU5      nU" S5      nSnSnSn[	        5       nU R                  5       n	U	R                  XXe5        U	R                  XXu5        [        U	R                  5       S	 S
9n
U R                  [        U
5      S5        U R                  U
S   U5        U R                  U
S   R                  U	5        U R                  U
S   R                  U5        U R                  U
S   R                  U5        U R                  U
S   R                   U5        U R                  U
S   R"                  U5        U R%                  U
S   R&                  5        U R                  U
S   U5        U R                  U
S   R                  U	5        U R                  U
S   R                  U5        U R                  U
S   R                  U5        U R                  U
S   R                   U5        U R                  U
S   R"                  U5        U R%                  U
S   R&                  5        g )Nr   rJ   rz   c                       \ rS rSrSrg)?ComponentsTests.test_registeredUtilities_notempty.<locals>.IFooi  r+   NrQ   r+   r   r   rV   rV    rW   r   rV   r^   r   r   c                     U R                   $ r   r   rs    r   <lambda>CComponentsTests.test_registeredUtilities_notempty.<locals>.<lambda>  s    qvvr   keyr   r   )r`   rK   r   r{   rp   r   ra   sortedr   r-   r   r0   r   r   r   r   rn   r^   r   ro   )r   rK   r{   rV   rb   rc   r   r   rt   r7   regs              r   !test_registeredUtilities_notempty1ComponentsTests.test_registeredUtilities_notempty  s   >?	> 	 F|(}}WF:WF:T--/5EFS1%c!f&9:c!foot,c!foot,c!fkk6*c!f&&0c!fkk5)#a&..)c!f&9:c!foot,c!foot,c!fkk6*c!f&&0c!fkk5)#a&..)r   c                     SSK Jn   " S SU5      nU" S5      nU R                  5       nU R                  UR	                  U5      5        g )Nr   rJ   c                       \ rS rSrSrg)?ComponentsTests.test_queryUtility_miss_no_default.<locals>.IFooi  r+   NrQ   r+   r   r   rV   re    rW   r   rV   )r`   rK   r   r   queryUtilityr   rK   rV   rb   r7   s        r   !test_queryUtility_miss_no_default1ComponentsTests.test_queryUtility_miss_no_default  s@    >	> 	 F|}}$++D12r   c                     SSK Jn   " S SU5      nU" S5      nU R                  5       n[        5       nU R	                  UR                  X5S9U5        g )Nr   rJ   c                       \ rS rSrSrg)>ComponentsTests.test_queryUtility_miss_w_default.<locals>.IFooi  r+   NrQ   r+   r   r   rV   rl    rW   r   rV   default)r`   rK   r   rp   r   rf  )r   rK   rV   rb   r7   _defaults         r    test_queryUtility_miss_w_default0ComponentsTests.test_queryUtility_miss_w_default  sJ    >	> 	 F|}}8d'''?Jr   c                     SSK Jn   " S SU5      nU" S5      n[        5       nU R                  5       nUR	                  XC5        U R                  UR                  U5      U5        g )Nr   rJ   c                       \ rS rSrSrg)3ComponentsTests.test_queryUtility_hit.<locals>.IFooi  r+   NrQ   r+   r   r   rV   rt    rW   r   rV   )r`   rK   rp   r   ra   r   rf  r   rK   rV   rb   rt   r7   s         r   test_queryUtility_hit%ComponentsTests.test_queryUtility_hit	  sU    >	> 	 F|(}}W+d''-w7r   c                     SSK Jn  SSKJn   " S SU5      nU" S5      nU R	                  5       nU R                  X%R                  U5        g )Nr   rJ   ComponentLookupErrorc                       \ rS rSrSrg)2ComponentsTests.test_getUtility_miss.<locals>.IFooi  r+   NrQ   r+   r   r   rV   r|    rW   r   rV   )r`   rK   r   rz  r   rq   
getUtility)r   rK   rz  rV   rb   r7   s         r   test_getUtility_miss$ComponentsTests.test_getUtility_miss  s?    >B	> 	 F|}}.Fr   c                     SSK Jn   " S SU5      nU" S5      n[        5       nU R                  5       nUR	                  XC5        U R                  UR                  U5      U5        g )Nr   rJ   c                       \ rS rSrSrg)1ComponentsTests.test_getUtility_hit.<locals>.IFooi#  r+   NrQ   r+   r   r   rV   r  #  rW   r   rV   )r`   rK   rp   r   ra   r   r}  ru  s         r   test_getUtility_hit#ComponentsTests.test_getUtility_hit   sS    >	> 	 F|(}}W+dood+W5r   c                     SSK Jn   " S SU5      nU" S5      nU R                  5       nU R                  [	        UR                  U5      5      / 5        g )Nr   rJ   c                       \ rS rSrSrg)7ComponentsTests.test_getUtilitiesFor_miss.<locals>.IFooi/  r+   NrQ   r+   r   r   rV   r  /  rW   r   rV   )r`   rK   r   r-   r   getUtilitiesForrg  s        r   test_getUtilitiesFor_miss)ComponentsTests.test_getUtilitiesFor_miss,  sG    >	> 	 F|}}d224892>r   c                    SSK Jn   " S SU5      nU" S5      nSnSn[        5       nU R                  5       nUR	                  XcUS9  UR	                  XcUS9  U R                  [        UR                  U5      5      XF4XV4/5        g )Nr   rJ   c                       \ rS rSrSrg)6ComponentsTests.test_getUtilitiesFor_hit.<locals>.IFooi9  r+   NrQ   r+   r   r   rV   r  9  rW   r   rV   r   r   rX  )r`   rK   rp   r   ra   r-   r_  r  r   rK   rV   rb   r   r   rt   r7   s           r   test_getUtilitiesFor_hit(ComponentsTests.test_getUtilitiesFor_hit6  s    >	> 	 F|(}}W8W8 4 4T :;!+f->?	Ar   c                     SSK Jn   " S SU5      nU" S5      nU R                  5       nU R                  [	        UR                  U5      5      / 5        g )Nr   rJ   c                       \ rS rSrSrg)DComponentsTests.test_getAllUtilitiesRegisteredFor_miss.<locals>.IFooiI  r+   NrQ   r+   r   r   rV   r  I  rW   r   rV   )r`   rK   r   r-   r   getAllUtilitiesRegisteredForrg  s        r   &test_getAllUtilitiesRegisteredFor_miss6ComponentsTests.test_getAllUtilitiesRegisteredFor_missF  sG    >	> 	 F|}}d??EFKr   c                    SSK Jn   " S SU5      nU" S5      nSnSn[        5       nU R                  5       nUR	                  XcUS9  UR	                  XcUS9  U R                  [        UR                  U5      5      U/5        g )Nr   rJ   c                       \ rS rSrSrg)CComponentsTests.test_getAllUtilitiesRegisteredFor_hit.<locals>.IFooiS  r+   NrQ   r+   r   r   rV   r  S  rW   r   rV   r   r   rX  )r`   rK   rp   r   ra   r-   r   r  r  s           r   %test_getAllUtilitiesRegisteredFor_hit5ComponentsTests.test_getAllUtilitiesRegisteredFor_hitP  s    >	> 	 F|(}}W8W8d??EF!	$r   c                 
   SSK Jn  SSK Jn   " S SU5      nU" S5      nU" S5      nU" S5       " S S	5      5       nS
nU R                  5       nUR	                  Xe4XGS9  U R                  UR                  U4US4   Xg45        g )Nr   rJ   rL   c                       \ rS rSrSrg)FComponentsTests.test_registerAdapter_with_component_name.<locals>.IFooid  r+   NrQ   r+   r   r   rV   r  d  rW   r   rV   r   rX   c                       \ rS rSrSrg)EComponentsTests.test_registerAdapter_with_component_name.<locals>.Fooij  r+   NrQ   r+   r   r   r\   r  j  r]   r   r\   r^   r_   )r`   rK   rM   r   registerAdapterr-   r4   )	r   rK   rM   rV   rb   ibarr\   rc   r7   s	            r   (test_registerAdapter_with_component_name8ComponentsTests.test_registerAdapter_with_component_name`  s    >5	> 	 F|F|	u	 	 
	}}S'4<''u(<=L	r   c                 P   SSK Jn  SSKJn  SSKJn   " S SU5      nU" S5      nU" S5      nSnS	nS
 n	U R                  5       n
U R                  5       u  pU   U
R                  X4XXU5        S S S 5        U R                  U
R                  R                  S   U   U   U   U	5        U R                  U
R                  U4XX4   X45        U R                  [        U5      S5        US   u  pUu  nU R                  U0 5        U R                  X5        U R                  UR                   U5        U R                  UR                   R"                  U
5        U R                  UR                   R$                  U5        U R                  UR                   R&                  U45        U R                  UR                   R(                  U5        U R                  UR                   R*                  U5        U R                  UR                   R,                  U	5        g ! , (       d  f       GN= f)Nr   rJ   rx   AdapterRegistrationc                       \ rS rSrSrg)SComponentsTests.test_registerAdapter_w_explicit_provided_and_required.<locals>.IFooi{  r+   NrQ   r+   r   r   rV   r  {  rW   r   rV   r   r^   r   c                     [        5       er   rh   contexts    r   rj   WComponentsTests.test_registerAdapter_w_explicit_provided_and_required.<locals>._factory  rl   r   r   r`   rK   r   ry   r   r  r   r&   r  r   r1   r   r-   r4   r   r0   rp   r   r   requiredr   r^   ro   )r   rK   ry   r  rV   rb   r  rc   r   rj   r7   r%   r   r   r   r   s                   r   5test_registerAdapter_w_explicit_provided_and_requiredEComponentsTests.test_registerAdapter_w_explicit_provided_and_requiredv  s   >8?	> 	 F|F|	(}}++-  7DG MM##A&t,T259	
 	44dWd5IJ"*	,Wq)1:R e0ell,?@ell++T2ell++T2..8ell''/ell''/ell**H5' Ws   H
H%c           	          SSK Jn   " S SU5      nU" S5      nSnSn " S S	5      nU R                  5       nU R                  [        UR
                  Xc4XTS
9  g )Nr   rJ   c                       \ rS rSrSrg)HComponentsTests.test_registerAdapter_no_provided_available.<locals>.IFooi  r+   NrQ   r+   r   r   rV   r    rW   r   rV   r   r^   r   c                       \ rS rSrSrg)LComponentsTests.test_registerAdapter_no_provided_available.<locals>._Factoryi  r+   NrQ   r+   r   r   _Factoryr    rW   r   r  r   r^   r`   rK   r   rq   rr   r  )r   rK   rV   r  rc   r   r  r7   s           r   *test_registerAdapter_no_provided_available:ComponentsTests.test_registerAdapter_no_provided_available  sa    >	> 	 F|	 	 }})T%9%98W$ 	 	2r   c                 |   SSK Jn  SSK Jn  SSKJn  SSKJn   " S SU5      nU" S5      nU" S5      nS	nS
n	U" U5       " S S5      5       n
U R                  5       nU R                  5       u  pU   UR                  X4XS9  S S S 5        U R                  UR                  R                  S   U   U   U	   U
5        U R                  UR                  U4Xi4   X45        U R                  [        U5      S5        US   u  pUu  nU R                  U0 5        U R!                  UU5        U R!                  UR"                  U5        U R                  UR"                  R$                  U5        U R                  UR"                  R&                  U5        U R                  UR"                  R(                  U45        U R                  UR"                  R*                  U	5        U R                  UR"                  R,                  U5        U R                  UR"                  R.                  U
5        g ! , (       d  f       GN= f)Nr   rJ   implementerrx   r  c                       \ rS rSrSrg)GComponentsTests.test_registerAdapter_wo_explicit_provided.<locals>.IFooi  r+   NrQ   r+   r   r   rV   r    rW   r   rV   r   r^   r   c                       \ rS rSrSrg)KComponentsTests.test_registerAdapter_wo_explicit_provided.<locals>._Factoryi  r+   NrQ   r+   r   r   r  r    r]   r   r  r  r   )r`   rK   r  r   ry   r   r  r   r&   r  r   r1   r   r-   r4   r   r0   rp   r   r   r  r   r^   ro   )r   rK   r  ry   r  rV   rb   r  rc   r   r  r7   r%   r   r   r   r   s                    r   )test_registerAdapter_wo_explicit_provided9ComponentsTests.test_registerAdapter_wo_explicit_provided  s   >;8?	> 	 F|F|	T		 	 
	 }}++-  7 K MM##A&t,T259	
 	44dWd5IJ"*	,Wq)1:R eZ0ell,?@ell++T2ell++T2..8ell''/ell''/ell**H5' Ws   1H,,
H;c           	          SSK Jn   " S SU5      nU" S5      nSnSn " S S5      nU R                  5       nU R                  [        UR
                  UX5US	9  g )
Nr   rJ   c                       \ rS rSrSrg)HComponentsTests.test_registerAdapter_no_required_available.<locals>.IFooi  r+   NrQ   r+   r   r   rV   r    rW   r   rV   r^   r   c                       \ rS rSrSrg)LComponentsTests.test_registerAdapter_no_required_available.<locals>._Factoryi  r+   NrQ   r+   r   r   r  r    rW   r   r  r   r   r^   r  r   rK   rV   rb   rc   r   r  r7   s           r   *test_registerAdapter_no_required_available:ComponentsTests.test_registerAdapter_no_required_available  sb    >	> 	 F|	 	 }})T%9%98#'% 	 	Ar   c           
          SSK Jn   " S SU5      nU" S5      nU" S5      nSnSn " S S	5      nU R                  5       nU R                  [        UR
                  UXCXeS
9  g )Nr   rJ   c                       \ rS rSrSrg)EComponentsTests.test_registerAdapter_w_invalid_required.<locals>.IFooi  r+   NrQ   r+   r   r   rV   r    rW   r   rV   r   r^   r   c                       \ rS rSrSrg)IComponentsTests.test_registerAdapter_w_invalid_required.<locals>._Factoryi  r+   NrQ   r+   r   r   r  r    rW   r   r  r  r  )	r   rK   rV   rb   r  rc   r   r  r7   s	            r   'test_registerAdapter_w_invalid_required7ComponentsTests.test_registerAdapter_w_invalid_required  sk    >	> 	 F|F|	 	 }})T%9%98E 	 	Gr   c           	      X   SSK Jn  SSKJn  SSKJn  SSKJn   " S SU5      nU" S5      nSnS	n " S
 S5      n	U R                  5       n
U R                  5       u  pU   U
R                  U	S /UXS9  S S S 5        U R                  U
R                  R                  S   U   U   U   U	5        U R                  U
R                  U4Xh4   X45        U R                  [!        U5      S5        US   u  pUu  nU R                  U0 5        U R#                  X5        U R#                  UR$                  U5        U R                  UR$                  R&                  U
5        U R                  UR$                  R(                  U5        U R                  UR$                  R*                  U45        U R                  UR$                  R,                  U5        U R                  UR$                  R.                  U5        U R                  UR$                  R0                  U	5        g ! , (       d  f       GN= f)Nr   rJ   r   rx   r  c                       \ rS rSrSrg)MComponentsTests.test_registerAdapter_w_required_containing_None.<locals>.IFooi   r+   NrQ   r+   r   r   rV   r     rW   r   rV   r^   r   c                       \ rS rSrSrg)QComponentsTests.test_registerAdapter_w_required_containing_None.<locals>._Factoryi  r+   NrQ   r+   r   r   r  r    rW   r   r  r  r   )r`   rK   zope.interface.interfacer   r   ry   r   r  r   r&   r  r   r1   r   r-   r4   r   r0   rp   r   r   r  r   r^   ro   )r   rK   r   ry   r  rV   rb   rc   r   r  r7   r%   r   r   r   r   s                   r   /test_registerAdapter_w_required_containing_None?ComponentsTests.test_registerAdapter_w_required_containing_None  s   >68?	> 	 F|	 	 }}++-  D6D&+ ! 9  	MM##A&y1$7>	
 	''d(AB	
 	Wq)1:R e0ell,?@ell++T2ell++T2..=ell''/ell''/ell**H5- Ws   H
H)c           	         SSK Jn  SSK Jn  SSK Jn  SSKJn  SSKJn   " S SU5      nU" S5      nU" S	5      nS
n	Sn
 " S S5      nU" U5       " S S5      5       nU" U5      nU R                  5       nU R                  5       u  nnU   UR                  X/UXS9  S S S 5        U R                  UR                  R                  S   U   U   U
   U5        U R                  UR                  U4Xz4   X45        U R                  [!        U5      S5        US   u  nnUu  nU R                  U0 5        U R#                  UU5        U R#                  UR$                  U5        U R                  UR$                  R&                  U5        U R                  UR$                  R(                  U5        U R                  UR$                  R*                  U45        U R                  UR$                  R,                  U
5        U R                  UR$                  R.                  U	5        U R                  UR$                  R0                  U5        g ! , (       d  f       GN= f)Nr   rJ   )implementedByr  rx   r  c                       \ rS rSrSrg)NComponentsTests.test_registerAdapter_w_required_containing_class.<locals>.IFooi+  r+   NrQ   r+   r   r   rV   r  +  rW   r   rV   r   r^   r   c                       \ rS rSrSrg)RComponentsTests.test_registerAdapter_w_required_containing_class.<locals>._Factoryi3  r+   NrQ   r+   r   r   r  r  3  rW   r   r  c                       \ rS rSrSrg)RComponentsTests.test_registerAdapter_w_required_containing_class.<locals>._Contexti6  r+   NrQ   r+   r   r   _Contextr  6  r]   r   r  r  r   )r`   rK   r  r  r   ry   r   r  r   r&   r  r   r1   r   r-   r4   r   r0   rp   r   r   r  r   r^   ro   )r   rK   r  r  ry   r  rV   rb   r  rc   r   r  r  	_ctx_implr7   r%   r   r   r   r   s                       r   0test_registerAdapter_w_required_containing_class@ComponentsTests.test_registerAdapter_w_required_containing_class$  s	   >=;8?	> 	 F|F|	 	 
T		 	 
	 "(+	}}++-  :&+ ! 9  	MM##A&y1$7>	
 	''d(AB	
 	Wq)1:bR eZ0ell,?@ell++T2ell++T2..=ell''/ell''/ell**H5- Ws   
I
Ic           	         SSK Jn   " S SU5      nU" S5      nSnSn " S S5      nU R                  5       nU R                  [        5         UR                  U[        5       /X5US	9  S S S 5        g ! , (       d  f       g = f)
Nr   rJ   c                       \ rS rSrSrg)MComponentsTests.test_registerAdapter_w_required_containing_junk.<locals>.IFooiX  r+   NrQ   r+   r   r   rV   r  X  rW   r   rV   r^   r   c                       \ rS rSrSrg)QComponentsTests.test_registerAdapter_w_required_containing_junk.<locals>._Factoryi`  r+   NrQ   r+   r   r   r  r  `  rW   r   r  r  )r`   rK   r   rq   rr   r  rp   r  s           r   /test_registerAdapter_w_required_containing_junk?ComponentsTests.test_registerAdapter_w_required_containing_junkU  sw    >	> 	 F|	 	 }}y)  68*te !  *))s   A22
B c                 `  ^ SSK Jn  SSKJn  SSKJn   " S SU5      nU" S5      nU" S5      mSnS	n " U4S
 jS5      nU R                  5       n	U R                  5       u  pU
   U	R                  XUUS9  S S S 5        U R                  U	R                  R                  S   T   U   U   U5        U R                  U	R                  T4XW4   X45        U R                  [        U5      S5        US   u  pUu  nU R                  U0 5        U R                  X5        U R                  UR                   U5        U R                  UR                   R"                  U	5        U R                  UR                   R$                  U5        U R                  UR                   R&                  T45        U R                  UR                   R(                  U5        U R                  UR                   R*                  U5        U R                  UR                   R,                  U5        g ! , (       d  f       GN= f)Nr   rJ   rx   r  c                       \ rS rSrSrg)GComponentsTests.test_registerAdapter_wo_explicit_required.<locals>.IFooin  r+   NrQ   r+   r   r   rV   r  n  rW   r   rV   r   r^   r   c                      > \ rS rSr Y 4rSrg)KComponentsTests.test_registerAdapter_wo_explicit_required.<locals>._Factoryiv  r+   Nr.   rR   rS   rT   __component_adapts__rU   r  s   r   r  r  v      $(7 r   r  r  r   r  )r   rK   ry   r  rV   rb   rc   r   r  r7   r%   r   r   r   r   r  s                  @r   )test_registerAdapter_wo_explicit_required9ComponentsTests.test_registerAdapter_wo_explicit_requiredi  s   >8?	> 	 F|F|	+ 	+ }}++-  u&+ ! -  	MM##A&t,T259	
 	44dWd5IJ"*	,Wq)1:R e0ell,?@ell++T2ell++T2..8ell''/ell''/ell**H5) Ws   $H
H-c           
      ,   SSK Jn   " S SU5      nU" S5      nU" S5      nSnSnS nU R                  5       nU R                  5       u  pU	   UR	                  Xt4X6US	S
9  S S S 5        U R                  [        U
5      S5        g ! , (       d  f       N*= f)Nr   rJ   c                       \ rS rSrSrg);ComponentsTests.test_registerAdapter_wo_event.<locals>.IFooi  r+   NrQ   r+   r   r   rV   r    rW   r   rV   r   r^   r   c                     [        5       er   rh   r  s    r   rj   ?ComponentsTests.test_registerAdapter_wo_event.<locals>._factory  rl   r   F)r   )r`   rK   r   r&   r  r-   r   )r   rK   rV   rb   r  rc   r   rj   r7   r%   r   s              r   test_registerAdapter_wo_event-ComponentsTests.test_registerAdapter_wo_event  s    >	> 	 F|F|	(}}++-  7D', ! .  	Wq) Ws   B
Bc                 d    U R                  5       nU R                  [        UR                  S S S9  g N)ro   r   )r   rq   rr   unregisterAdapterrA   s     r   3test_unregisterAdapter_neither_factory_nor_providedCComponentsTests.test_unregisterAdapter_neither_factory_nor_provided  s/    }})T%;%;"& 	 	7r   c                     SSK Jn   " S SU5      nU" S5      nU R                  5       nU R                  [        UR
                  S US S9  g )Nr   rJ   c                       \ rS rSrSrg)QComponentsTests.test_unregisterAdapter_neither_factory_nor_required.<locals>.IFooi  r+   NrQ   r+   r   r   rV   r	    rW   r   rV   ro   r   r  )r`   rK   r   rq   rr   r  rg  s        r   3test_unregisterAdapter_neither_factory_nor_requiredCComponentsTests.test_unregisterAdapter_neither_factory_nor_required  sL    >	> 	 F|}})T%;%;"& 	 	Fr   c                    SSK Jn   " S SU5      nU" S5      nU" S5      n " S S5      nU R                  5       nU R                  5       u  pxU   UR	                  XT4U5      n	S S S 5        U R                  W	5        g ! , (       d  f       N = f)Nr   rJ   c                       \ rS rSrSrg)9ComponentsTests.test_unregisterAdapter_miss.<locals>.IFooi  r+   NrQ   r+   r   r   rV   r    rW   r   rV   r   c                       \ rS rSrSrg)=ComponentsTests.test_unregisterAdapter_miss.<locals>._Factoryi  r+   NrQ   r+   r   r   r  r    rW   r   r  )r`   rK   r   r&   r  r  
r   rK   rV   rb   r  r  r7   r%   r   r  s
             r   test_unregisterAdapter_miss+ComponentsTests.test_unregisterAdapter_miss  s    >	> 	 F|F|	 	 }}++-**8WdCE  Ws   A>>
Bc                 r   SSK Jn  SSKJn  SSKJn   " S SU5      nU" S5      nU" S5      n " S S	5      nU R                  5       nUR                  Xv4U5        U R                  5       u  pU	   UR                  Xv4U5      nS S S 5        U R                  W5        U R                  UR                  R                  5        U R                  UR                  5        U R                  [!        U
5      S
5        U
S   u  pUu  nU R                  U0 5        U R#                  X5        U R#                  UR$                  U5        U R'                  UR$                  R(                  U5        U R'                  UR$                  R*                  U5        U R                  UR$                  R,                  U45        U R                  UR$                  R.                  S5        U R                  UR$                  R0                  S5        U R'                  UR$                  R2                  U5        g ! , (       d  f       GN= f)Nr   rJ   r   r  c                       \ rS rSrSrg)YComponentsTests.test_unregisterAdapter_hit_w_explicit_provided_and_required.<locals>.IFooi  r+   NrQ   r+   r   r   rV   r    rW   r   rV   r   c                       \ rS rSrSrg)]ComponentsTests.test_unregisterAdapter_hit_w_explicit_provided_and_required.<locals>._Factoryi  r+   NrQ   r+   r   r   r  r    rW   r   r  r   r   )r`   rK   r   r   r   r  r   r  r&   r  r  r  r1   r   r4   r-   r   r0   rp   r   r   r   r  r   r^   ro   )r   rK   r   r  rV   rb   r  r  r7   r%   r   r  r   r   r   s                  r   ;test_unregisterAdapter_hit_w_explicit_provided_and_requiredKComponentsTests.test_unregisterAdapter_hit_w_explicit_provided_and_required  s   >:?	> 	 F|F|	 	 }}Xw5++-**8WdCE 001445Wq)1:R e2ell,?@ell++T2ell++T2..8**B/**B/ell**H5! W   /H''
H6c                    SSK Jn  SSK Jn  SSKJn  SSKJn   " S SU5      nU" S5      nU" S5      nU" U5       " S	 S
5      5       nU R                  5       n	U	R                  X4U5        U R                  5       u  pU
   U	R                  X45      nS S S 5        U R                  W5        U R                  [        U5      S5        US   u  pUu  nU R                  U0 5        U R                  X5        U R                  UR                  U5        U R!                  UR                  R"                  U	5        U R!                  UR                  R$                  U5        U R                  UR                  R&                  U45        U R                  UR                  R(                  S5        U R                  UR                  R*                  S5        U R!                  UR                  R,                  U5        g ! , (       d  f       GNk= f)Nr   rJ   r  r   r  c                       \ rS rSrSrg)IComponentsTests.test_unregisterAdapter_wo_explicit_provided.<locals>.IFooi  r+   NrQ   r+   r   r   rV   r    rW   r   rV   r   c                       \ rS rSrSrg)MComponentsTests.test_unregisterAdapter_wo_explicit_provided.<locals>._Factoryi  r+   NrQ   r+   r   r   r  r!    r]   r   r  r   r   )r`   rK   r  r   r   r   r  r   r  r&   r  r  r-   r   r0   rp   r   r   r   r  r   r^   ro   )r   rK   r  r   r  rV   rb   r  r  r7   r%   r   r  r   r   r   s                   r   +test_unregisterAdapter_wo_explicit_provided;ComponentsTests.test_unregisterAdapter_wo_explicit_provided  s   >;:?	> 	 F|F|	T		 	 
	 }}Xw5++-**8W=E Wq)1:R e2ell,?@ell++T2ell++T2..8**B/**B/ell**H5 W    G77
Hc                   ^ SSK Jn  SSKJn  SSKJn   " S SU5      nU" S5      nU" S5      m " U4S jS	5      nU R                  5       nUR                  UT4U5        U R                  5       u  pU   UR                  XeS
9n
S S S 5        U R                  W
5        U R                  [        U	5      S5        U	S   u  pUu  nU R                  U0 5        U R                  X5        U R                  UR                  U5        U R                  UR                  R                   U5        U R                  UR                  R"                  U5        U R                  UR                  R$                  T45        U R                  UR                  R&                  S5        U R                  UR                  R(                  S5        U R                  UR                  R*                  U5        g ! , (       d  f       GNk= f)Nr   rJ   r   r  c                       \ rS rSrSrg)IComponentsTests.test_unregisterAdapter_wo_explicit_required.<locals>.IFooi  r+   NrQ   r+   r   r   rV   r'    rW   r   rV   r   c                      > \ rS rSr Y 4rSrg)MComponentsTests.test_unregisterAdapter_wo_explicit_required.<locals>._Factoryi  r+   Nr  r  s   r   r  r)    r  r   r  r   r   r   )r`   rK   r   r   r   r  r   r  r&   r  r  r-   r   r0   rp   r   r   r   r  r   r^   ro   )r   rK   r   r  rV   rb   r  r7   r%   r   r  r   r   r   r  s                 @r   +test_unregisterAdapter_wo_explicit_required;ComponentsTests.test_unregisterAdapter_wo_explicit_required  s   >:?	> 	 F|F|	+ 	+ }}Xw5++-**8*CE Wq)1:R e2ell,?@ell++T2ell++T2..8**B/**B/ell**H5 W   4G((
G7c                 v    U R                  5       nU R                  [        UR                  5       5      / 5        g r   )r   r-   r   registeredAdaptersrA   s     r   test_registeredAdapters_empty-ComponentsTests.test_registeredAdapters_empty.  s+    }}d5578"=r   c                    SSK Jn  SSKJn   " S SU5      nU" S5      nU" S5      nSnSnSn " S	 S
5      n	U R	                  5       n
U
R                  X4XGU5        U
R                  X4XHU5        [        U
R                  5       S S9nU R                  [        U5      S5        U R                  US   U5        U R                  US   R                  U
5        U R                  US   R                  U5        U R                  US   R                  U45        U R                  US   R                  U5        U R                  US   R                   U5        U R                  US   R"                  U	5        U R                  US   U5        U R                  US   R                  U
5        U R                  US   R                  U5        U R                  US   R                  U45        U R                  US   R                  U5        U R                  US   R                   U5        U R                  US   R"                  U	5        g )Nr   rJ   r  c                       \ rS rSrSrg)>ComponentsTests.test_registeredAdapters_notempty.<locals>.IFooi6  r+   NrQ   r+   r   r   rV   r4  6  rW   r   rV   r^   r   r   c                       \ rS rSrSrg)BComponentsTests.test_registeredAdapters_notempty.<locals>._Factoryi?  r+   NrQ   r+   r   r   r  r6  ?  rW   r   r  c                     U R                   $ r   rX  rY  s    r   r[  BComponentsTests.test_registeredAdapters_notempty.<locals>.<lambda>E  s    affr   r]  r   r   )r`   rK   r   r  r   r  r_  r/  r-   r   r0   r   r   r   r  r   r^   ro   )r   rK   r  rV   rb   r  rc   r   r   r  r7   r`  s               r    test_registeredAdapters_notempty0ComponentsTests.test_registeredAdapters_notempty2  s   >?	> 	 F|F|	 	 }}XweDXweDT,,.4DES1%c!f&9:c!foot,c!foot,Q4'2c!fkk6*c!fkk5)c!fnnh/c!f&9:c!foot,c!foot,Q4'2c!fkk6*c!fkk5)c!fnnh/r   c                     SSK Jn   " S SU5      nU" S5      nU R                  5       n[        5       nU R	                  UR                  XS5      5        g )Nr   rJ   c                       \ rS rSrSrg)?ComponentsTests.test_queryAdapter_miss_no_default.<locals>.IFooiY  r+   NrQ   r+   r   r   rV   r=  Y  rW   r   rV   )r`   rK   r   rp   r   queryAdapter)r   rK   rV   rb   r7   _contexts         r   !test_queryAdapter_miss_no_default1ComponentsTests.test_queryAdapter_miss_no_defaultV  sG    >	> 	 F|}}8$++H;<r   c                     SSK Jn   " S SU5      nU" S5      nU R                  5       n[        5       n[        5       nU R	                  UR                  XSUS9U5        g )Nr   rJ   c                       \ rS rSrSrg)>ComponentsTests.test_queryAdapter_miss_w_default.<locals>.IFooid  r+   NrQ   r+   r   r   rV   rD  d  rW   r   rV   rm  )r`   rK   r   rp   r   r>  )r   rK   rV   rb   r7   r?  ro  s          r    test_queryAdapter_miss_w_default0ComponentsTests.test_queryAdapter_miss_w_defaulta  sW    >	> 	 F|}}88hh?	
r   c                 `   SSK Jn  SSK Jn   " S SU5      nU" S5      nU" S5      n " S S5      nU" U5       " S	 S
5      5       nU" 5       nU R                  5       n	U	R	                  Xe4U5        U	R                  X5      n
U R                  X5        U R                  U
R                  U5        g )Nr   rJ   r  c                       \ rS rSrSrg)3ComponentsTests.test_queryAdapter_hit.<locals>.IFooit  r+   NrQ   r+   r   r   rV   rI  t  rW   r   rV   r   c                       \ rS rSrS rSrg)7ComponentsTests.test_queryAdapter_hit.<locals>._Factoryiz  c                     Xl         g r   r  r   r  s     r   rC  @ComponentsTests.test_queryAdapter_hit.<locals>._Factory.__init__{      &r   r  Nr.   rR   rS   rT   rC  rU   r+   r   r   r  rK  z      'r   r  c                       \ rS rSrSrg)7ComponentsTests.test_queryAdapter_hit.<locals>._Contexti~  r+   NrQ   r+   r   r   r  rS  ~  r]   r   r  )	r`   rK   r  r   r  r>  r0   r   r  r   rK   r  rV   rb   r  r  r  r?  r7   adapters              r   test_queryAdapter_hit%ComponentsTests.test_queryAdapter_hitp  s    >;	> 	 F|F|	' 	' 
T		 	 
	 :}}Xw5##H3g0goox0r   c                     SSK Jn  SSK Jn  SSKJn   " S SU5      nU" S5      nU" S5      nU" U5       " S S	5      5       nU" 5       nU R                  5       n	U R                  UU	R                  X5        g )
Nr   rJ   r  ry  c                       \ rS rSrSrg)2ComponentsTests.test_getAdapter_miss.<locals>.IFooi  r+   NrQ   r+   r   r   rV   rZ    rW   r   rV   r   c                       \ rS rSrSrg)6ComponentsTests.test_getAdapter_miss.<locals>._Contexti  r+   NrQ   r+   r   r   r  r\    r]   r   r  )r`   rK   r  r   rz  r   rq   
getAdapter)
r   rK   r  rz  rV   rb   r  r  r?  r7   s
             r   test_getAdapter_miss$ComponentsTests.test_getAdapter_miss  su    >;B	> 	 F|F|	T		 	 
	 :}}.//8	;r   c                 `   SSK Jn  SSK Jn   " S SU5      nU" S5      nU" S5      n " S S5      nU" U5       " S	 S
5      5       nU" 5       nU R                  5       n	U	R	                  Xe4U5        U	R                  X5      n
U R                  X5        U R                  U
R                  U5        g )Nr   rJ   r  c                       \ rS rSrSrg)1ComponentsTests.test_getAdapter_hit.<locals>.IFooi  r+   NrQ   r+   r   r   rV   rb    rW   r   rV   r   c                       \ rS rSrS rSrg)5ComponentsTests.test_getAdapter_hit.<locals>._Factoryi  c                     Xl         g r   r  rM  s     r   rC  >ComponentsTests.test_getAdapter_hit.<locals>._Factory.__init__  rO  r   r  NrP  r+   r   r   r  rd    rQ  r   r  c                       \ rS rSrSrg)5ComponentsTests.test_getAdapter_hit.<locals>._Contexti  r+   NrQ   r+   r   r   r  rh    r]   r   r  )	r`   rK   r  r   r  r]  r0   r   r  rT  s              r   test_getAdapter_hit#ComponentsTests.test_getAdapter_hit  s    >;	> 	 F|F|	' 	' 
T		 	 
	 :}}Xw5//(1g0goox0r   c                   > SSK Jn  SSKJn   " S SU5      n " S SU5      n " S S	U5      nU" U5       " S
 S5      5       nU" U5       " S SU5      5       n " S S5      n " S S5      n	U R	                  5       n
U
R                  X4U5        U
R                  X4U5        U R                  U
5        U" 5       nU
R                  X5      nU R                  X5        U R                  UR                  U5        [        X{5      nU
R                  X5      nU R                  X5        U R                  UR                  U5        g )Nr   r   r  c                       \ rS rSrSrg)8ComponentsTests.test_getAdapter_hit_super.<locals>.IBasei  r+   NrQ   r+   r   r   IBaserm    rW   r   rn  c                       \ rS rSrSrg);ComponentsTests.test_getAdapter_hit_super.<locals>.IDerivedi  r+   NrQ   r+   r   r   IDerivedrp    rW   r   rq  c                       \ rS rSrSrg)7ComponentsTests.test_getAdapter_hit_super.<locals>.IFooi  r+   NrQ   r+   r   r   rV   rs    rW   r   rV   c                       \ rS rSrSrg)7ComponentsTests.test_getAdapter_hit_super.<locals>.Basei  r+   NrQ   r+   r   r   Baseru    r]   r   rv  c                       \ rS rSrSrg):ComponentsTests.test_getAdapter_hit_super.<locals>.Derivedi  r+   NrQ   r+   r   r   Derivedrx    r]   r   ry  c                       \ rS rSrS rSrg)>ComponentsTests.test_getAdapter_hit_super.<locals>.AdapterBasei  c                     Xl         g r   r  rM  s     r   rC  GComponentsTests.test_getAdapter_hit_super.<locals>.AdapterBase.__init__  rO  r   r  NrP  r+   r   r   AdapterBaser{    rQ  r   r~  c                       \ rS rSrS rSrg)AComponentsTests.test_getAdapter_hit_super.<locals>.AdapterDerivedi  c                     Xl         g r   r  rM  s     r   rC  JComponentsTests.test_getAdapter_hit_super.<locals>.AdapterDerived.__init__  rO  r   r  NrP  r+   r   r   AdapterDerivedr    rQ  r   r  r#   r   r`   r  r   r  _should_not_changer]  r0   r   r  r   r   r   r  rn  rq  rV   rv  ry  r~  r  r7   derivedrU  super   s                 r   test_getAdapter_hit_super)ComponentsTests.test_getAdapter_hit_super  s+   ,;	I 		u 		9 	 
U		 	 
	 
X		d 	 
		' 	'	' 	' }}^[$?[(D9%)//'0g6goow/W&//$-g3goow/r   c                   > SSK Jn  SSKJn   " S SU5      n " S SU5      n " S S	U5      n " S
 S5      n " S SU5      nU" U5       " S SU5      5       nU" U5       " S SXx5      5       n	 " S S5      n
 " S S5      nU R	                  5       nUR                  X4U5        UR                  X4U5        U R                  U5        U	" 5       nUR                  X5      nU R                  X5        U R                  UR                  U5        [        X5      nUR                  X5      nU R                  X5        U R                  UR                  U5        g )Nr   r   r  c                       \ rS rSrSrg)^ComponentsTests.test_getAdapter_hit_super_w_parent_implements_interface_diamond.<locals>.IBasei  r+   NrQ   r+   r   r   rn  r    rW   r   rn  c                       \ rS rSrSrg)aComponentsTests.test_getAdapter_hit_super_w_parent_implements_interface_diamond.<locals>.IDerivedi  r+   NrQ   r+   r   r   rq  r    rW   r   rq  c                       \ rS rSrSrg)]ComponentsTests.test_getAdapter_hit_super_w_parent_implements_interface_diamond.<locals>.IFooi  r+   NrQ   r+   r   r   rV   r    rW   r   rV   c                       \ rS rSrSrg)]ComponentsTests.test_getAdapter_hit_super_w_parent_implements_interface_diamond.<locals>.Basei  r+   NrQ   r+   r   r   rv  r    rW   r   rv  c                       \ rS rSrSrg)_ComponentsTests.test_getAdapter_hit_super_w_parent_implements_interface_diamond.<locals>.Child1i  r+   NrQ   r+   r   r   Child1r    rW   r   r  c                       \ rS rSrSrg)_ComponentsTests.test_getAdapter_hit_super_w_parent_implements_interface_diamond.<locals>.Child2i  r+   NrQ   r+   r   r   Child2r    r]   r   r  c                       \ rS rSrSrg)`ComponentsTests.test_getAdapter_hit_super_w_parent_implements_interface_diamond.<locals>.Derivedi  r+   NrQ   r+   r   r   ry  r    r]   r   ry  c                       \ rS rSrS rSrg)dComponentsTests.test_getAdapter_hit_super_w_parent_implements_interface_diamond.<locals>.AdapterBasei  c                     Xl         g r   r  rM  s     r   rC  mComponentsTests.test_getAdapter_hit_super_w_parent_implements_interface_diamond.<locals>.AdapterBase.__init__  rO  r   r  NrP  r+   r   r   r~  r    rQ  r   r~  c                       \ rS rSrS rSrg)gComponentsTests.test_getAdapter_hit_super_w_parent_implements_interface_diamond.<locals>.AdapterDerivedi  c                     Xl         g r   r  rM  s     r   rC  pComponentsTests.test_getAdapter_hit_super_w_parent_implements_interface_diamond.<locals>.AdapterDerived.__init__  rO  r   r  NrP  r+   r   r   r  r    rQ  r   r  r  )r   r   r  rn  rq  rV   rv  r  r  ry  r~  r  r7   r  rU  r  r   s                   r   ?test_getAdapter_hit_super_w_parent_implements_interface_diamondOComponentsTests.test_getAdapter_hit_super_w_parent_implements_interface_diamond  sC   ,;	I 		u 		9 		 		T 	 
U		T 	 
	 
X		f 	 
		' 	'	' 	' }}^[$?[(D9%)//'0g6goow/W&//$-g3goow/r   c                 8   SSK Jn  SSK Jn   " S SU5      nU" S5      nU" S5      nU" S5      nU" U5       " S S	5      5       nU" U5       " S
 S5      5       nU" 5       n	U" 5       n
U R                  5       nU R	                  UR                  X4U5      S 5        g )Nr   rJ   r  c                       \ rS rSrSrg)9ComponentsTests.test_queryMultiAdapter_miss.<locals>.IFooi  r+   NrQ   r+   r   r   rV   r    rW   r   rV   r   IBazc                       \ rS rSrSrg)>ComponentsTests.test_queryMultiAdapter_miss.<locals>._Context1i  r+   NrQ   r+   r   r   	_Context1r    r]   r   r  c                       \ rS rSrSrg)>ComponentsTests.test_queryMultiAdapter_miss.<locals>._Context2i"  r+   NrQ   r+   r   r   	_Context2r  "  r]   r   r  )r`   rK   r  r   r-   queryMultiAdapterr   rK   r  rV   rb   r  ibazr  r  	_context1	_context2r7   s               r   test_queryMultiAdapter_miss+ComponentsTests.test_queryMultiAdapter_miss  s    >;	> 	F|F|F|	T		 	 
	 
T		 	 
	 K	K	}}//0FM	r   c                 J   SSK Jn  SSK Jn   " S SU5      nU" S5      nU" S5      nU" S5      nU" U5       " S S	5      5       nU" U5       " S
 S5      5       nU" 5       n	U" 5       n
[        5       nU R	                  5       nU R                  UR                  X4UUS9U5        g )Nr   rJ   r  c                       \ rS rSrSrg)CComponentsTests.test_queryMultiAdapter_miss_w_default.<locals>.IFooi0  r+   NrQ   r+   r   r   rV   r  0  rW   r   rV   r   r  c                       \ rS rSrSrg)HComponentsTests.test_queryMultiAdapter_miss_w_default.<locals>._Context1i7  r+   NrQ   r+   r   r   r  r  7  r]   r   r  c                       \ rS rSrSrg)HComponentsTests.test_queryMultiAdapter_miss_w_default.<locals>._Context2i;  r+   NrQ   r+   r   r   r  r  ;  r]   r   r  rm  )r`   rK   r  rp   r   r   r  )r   rK   r  rV   rb   r  r  r  r  r  r  ro  r7   s                r   %test_queryMultiAdapter_miss_w_default5ComponentsTests.test_queryMultiAdapter_miss_w_default,  s    >;	> 	 F|F|F|	T		 	 
	 
T		 	 
	 K	K	8}}""I#94+3 # 5	
r   c                    SSK Jn  SSK Jn   " S SU5      nU" S5      nU" S5      nU" S5      nU" U5       " S S	5      5       nU" U5       " S
 S5      5       nU" 5       n	U" 5       n
 " S S5      nU R                  5       nUR	                  XU4U5        UR                  X4U5      nU R                  X5        U R                  UR                  X45        g )Nr   rJ   r  c                       \ rS rSrSrg)8ComponentsTests.test_queryMultiAdapter_hit.<locals>.IFooiM  r+   NrQ   r+   r   r   rV   r  M  rW   r   rV   r   r  c                       \ rS rSrSrg)=ComponentsTests.test_queryMultiAdapter_hit.<locals>._Context1iT  r+   NrQ   r+   r   r   r  r  T  r]   r   r  c                       \ rS rSrSrg)=ComponentsTests.test_queryMultiAdapter_hit.<locals>._Context2iX  r+   NrQ   r+   r   r   r  r  X  r]   r   r  c                       \ rS rSrS rSrg)<ComponentsTests.test_queryMultiAdapter_hit.<locals>._Factoryi_  c                     X4U l         g r   r  r   context1context2s      r   rC  EComponentsTests.test_queryMultiAdapter_hit.<locals>._Factory.__init__`      '1r   r  NrP  r+   r   r   r  r  _      2r   r  )	r`   rK   r  r   r  r  r0   r-   r  r   rK   r  rV   rb   r  r  r  r  r  r  r  r7   rU  s                 r   test_queryMultiAdapter_hit*ComponentsTests.test_queryMultiAdapter_hitI  s    >;	> 	 F|F|F|	T		 	 
	 
T		 	 
	 K	K		2 	2 }}Xd|T:(())?Fg09*@Ar   c                 <   SSK Jn  SSK Jn  SSKJn   " S SU5      nU" S5      nU" S5      nU" S5      nU" U5       " S	 S
5      5       nU" U5       " S S5      5       n	U" 5       n
U	" 5       nU R                  5       nU R                  UUR                  X4U5        g )Nr   rJ   r  ry  c                       \ rS rSrSrg)7ComponentsTests.test_getMultiAdapter_miss.<locals>.IFooin  r+   NrQ   r+   r   r   rV   r  n  rW   r   rV   r   r  c                       \ rS rSrSrg)<ComponentsTests.test_getMultiAdapter_miss.<locals>._Context1iu  r+   NrQ   r+   r   r   r  r  u  r]   r   r  c                       \ rS rSrSrg)<ComponentsTests.test_getMultiAdapter_miss.<locals>._Context2iy  r+   NrQ   r+   r   r   r  r  y  r]   r   r  )r`   rK   r  r   rz  r   rq   getMultiAdapter)r   rK   r  rz  rV   rb   r  r  r  r  r  r  r7   s                r   test_getMultiAdapter_miss)ComponentsTests.test_getMultiAdapter_missi  s    >;B	> 	 F|F|F|	T		 	 
	 
T		 	 
	 K	K	}}...0F	Nr   c                    SSK Jn  SSK Jn   " S SU5      nU" S5      nU" S5      nU" S5      nU" U5       " S S	5      5       nU" U5       " S
 S5      5       nU" 5       n	U" 5       n
 " S S5      nU R                  5       nUR	                  XU4U5        UR                  X4U5      nU R                  X5        U R                  UR                  X45        g )Nr   rJ   r  c                       \ rS rSrSrg)6ComponentsTests.test_getMultiAdapter_hit.<locals>.IFooi  r+   NrQ   r+   r   r   rV   r    rW   r   rV   r   r  c                       \ rS rSrSrg);ComponentsTests.test_getMultiAdapter_hit.<locals>._Context1i  r+   NrQ   r+   r   r   r  r    r]   r   r  c                       \ rS rSrSrg);ComponentsTests.test_getMultiAdapter_hit.<locals>._Context2i  r+   NrQ   r+   r   r   r  r    r]   r   r  c                       \ rS rSrS rSrg):ComponentsTests.test_getMultiAdapter_hit.<locals>._Factoryi  c                     X4U l         g r   r  r  s      r   rC  CComponentsTests.test_getMultiAdapter_hit.<locals>._Factory.__init__  r  r   r  NrP  r+   r   r   r  r    r  r   r  )	r`   rK   r  r   r  r  r0   r-   r  r  s                 r   test_getMultiAdapter_hit(ComponentsTests.test_getMultiAdapter_hit  s    >;	> 	 F|F|F|	T		 	 
	 
T		 	 
	 K	K		2 	2 }}Xd|T:&&	'=tDg09*@Ar   c                 r   ^  U 4S jnX!l         X!R                  l         X!R                  R                  l         g )Nc                  (   > TR                  S5        g )NzNothing should get changed)fail)r   r   s    r   
no_changes6ComponentsTests._should_not_change.<locals>.no_changes  s    II23r   )changedr1   	_v_lookup)r   r7   r  s   `  r   r  "ComponentsTests._should_not_change  s'    	4! **4'r   c                 (  > SSK Jn  SSKJn   " S SU5      n " S SU5      n " S S	U5      nU" U5       " S
 S5      5       nU" U5       " S SU5      5       n " S S5      n " S SU5      n	U R	                  5       n
U
R                  XU4U5        U
R                  XU4U5        U R                  U
5        U" 5       nU
R                  X4U5      nU R                  X5        U R                  UR                  U5        U R                  UR                  U5        [        X{5      nU
R                  X4U5      nU R                  X5        U R                  X5        U R                  UR                  U5        U R                  UR                  U5        g )Nr   r   r  c                       \ rS rSrSrg)=ComponentsTests.test_getMultiAdapter_hit_super.<locals>.IBasei  r+   NrQ   r+   r   r   rn  r    rW   r   rn  c                       \ rS rSrSrg)@ComponentsTests.test_getMultiAdapter_hit_super.<locals>.IDerivedi  r+   NrQ   r+   r   r   rq  r    rW   r   rq  c                       \ rS rSrSrg)<ComponentsTests.test_getMultiAdapter_hit_super.<locals>.IFooi  r+   NrQ   r+   r   r   rV   r    rW   r   rV   c                       \ rS rSrSrg)<ComponentsTests.test_getMultiAdapter_hit_super.<locals>.Basei  r+   NrQ   r+   r   r   rv  r    r]   r   rv  c                       \ rS rSrSrg)?ComponentsTests.test_getMultiAdapter_hit_super.<locals>.Derivedi  r+   NrQ   r+   r   r   ry  r    r]   r   ry  c                       \ rS rSrS rSrg)CComponentsTests.test_getMultiAdapter_hit_super.<locals>.AdapterBasei  c                     Xl         X l        g r   r  r  r  s      r   rC  LComponentsTests.test_getMultiAdapter_hit_super.<locals>.AdapterBase.__init__  s     ( (r   r   NrP  r+   r   r   r~  r    s    )r   r~  c                       \ rS rSrSrg)FComponentsTests.test_getMultiAdapter_hit_super.<locals>.AdapterDerivedi  r+   NrQ   r+   r   r   r  r    rW   r   r  )r#   r   r`   r  r   r  r  r  r0   r   r  r  r   assertNotIsInstancer  s                 r   test_getMultiAdapter_hit_super.ComponentsTests.test_getMultiAdapter_hit_super  sz   ,;	I 		u 		9 	 
U		 	 
	 
X		d 	 
		) 	)
	[ 	 }}^-A4H[(*;TB%)&&'94@g6g&&0g&&0W&&&=g3  9g&&0g&&0r   c                 J   SSK Jn  SSK Jn   " S SU5      nU" S5      nU" S5      nU" S5      nU" U5       " S S	5      5       nU" U5       " S
 S5      5       nU" 5       n	U" 5       n
U R                  5       nU R	                  [        UR                  X4U5      5      / 5        g )Nr   rJ   r  c                       \ rS rSrSrg)4ComponentsTests.test_getAdapters_empty.<locals>.IFooi  r+   NrQ   r+   r   r   rV   r	    rW   r   rV   r   r  c                       \ rS rSrSrg)9ComponentsTests.test_getAdapters_empty.<locals>._Context1i  r+   NrQ   r+   r   r   r  r    r]   r   r  c                       \ rS rSrSrg)9ComponentsTests.test_getAdapters_empty.<locals>._Context2i  r+   NrQ   r+   r   r   r  r    r]   r   r  )r`   rK   r  r   r-   r   getAdaptersr  s               r   test_getAdapters_empty&ComponentsTests.test_getAdapters_empty  s    >;	> 	 F|F|F|	T		 	 
	 
T		 	 
	 K	K	}}!!9"8$?@"	Fr   c                   ^ SSK Jn  SSK Jn   " S SU5      nU" S5      nU" S5      nU" S5      nU" U5       " S S	5      5       nU" U5       " S
 S5      5       nU" 5       n	U" 5       n
U R                  5       n/ mU4S jnUR	                  XU4U5        U R                  [        UR                  X4U5      5      / 5        U R                  TX4/5        g )Nr   rJ   r  c                       \ rS rSrSrg)CComponentsTests.test_getAdapters_factory_returns_None.<locals>.IFooi  r+   NrQ   r+   r   r   rV   r    rW   r   rV   r   r  c                       \ rS rSrSrg)HComponentsTests.test_getAdapters_factory_returns_None.<locals>._Context1i   r+   NrQ   r+   r   r   r  r     r]   r   r  c                       \ rS rSrSrg)HComponentsTests.test_getAdapters_factory_returns_None.<locals>._Context2i  r+   NrQ   r+   r   r   r  r    r]   r   r  c                 *   > TR                  X45        g r   r   )r  r  _called_withs     r   _side_effect_onlyPComponentsTests.test_getAdapters_factory_returns_None.<locals>._side_effect_only  s     45r   )r`   rK   r  r   r  r-   r   r  )r   rK   r  rV   rb   r  r  r  r  r  r  r7   r  r  s                @r   %test_getAdapters_factory_returns_None5ComponentsTests.test_getAdapters_factory_returns_None  s    >;	> 	 F|F|F|	T		 	 
	 
T		 	 
	 K	K	}}	 	.tdC!!9"8$?@"	F(>'?@r   c                    SSK Jn  SSK Jn   " S SU5      nU" S5      nU" S5      nU" S5      nU" U5       " S S	5      5       nU" U5       " S
 S5      5       nU" 5       n	U" 5       n
 " S S5      n " S S5      nSnSnU R                  5       nUR	                  XU4XMS9  UR	                  XU4XNS9  [        UR                  X4U5      5      nU R                  [        U5      S5        U R                  US   S   U5        U R                  US   S   U5        U R                  US   S   U5        U R                  US   S   U5        g )Nr   rJ   r  c                       \ rS rSrSrg)8ComponentsTests.test_getAdapters_non_empty.<locals>.IFooi  r+   NrQ   r+   r   r   rV   r     rW   r   rV   r   r  c                       \ rS rSrSrg)=ComponentsTests.test_getAdapters_non_empty.<locals>._Context1i!  r+   NrQ   r+   r   r   r  r"  !  r]   r   r  c                       \ rS rSrSrg)=ComponentsTests.test_getAdapters_non_empty.<locals>._Context2i%  r+   NrQ   r+   r   r   r  r$  %  r]   r   r  c                       \ rS rSrS rSrg)=ComponentsTests.test_getAdapters_non_empty.<locals>._Factory1i,  c                     X4U l         g r   r  r  s      r   rC  FComponentsTests.test_getAdapters_non_empty.<locals>._Factory1.__init__-  r  r   r  NrP  r+   r   r   	_Factory1r&  ,  r  r   r)  c                       \ rS rSrS rSrg)=ComponentsTests.test_getAdapters_non_empty.<locals>._Factory2i0  c                     X4U l         g r   r  r  s      r   rC  FComponentsTests.test_getAdapters_non_empty.<locals>._Factory2.__init__1  r  r   r  NrP  r+   r   r   	_Factory2r+  0  r  r   r.  r   r   rX  r   r   )
r`   rK   r  r   r  r_  r  r-   r   r0   )r   rK   r  rV   rb   r  r  r  r  r  r  r)  r.  r   r   r7   founds                    r   test_getAdapters_non_empty*ComponentsTests.test_getAdapters_non_empty  sb   >;	> 	 F|F|F|	T		 	 
	 
T		 	 
	 K	K		2 	2	2 	2 }}YtdHYtdHt''(>EFUQ'q!f-eAhqk95q!f-eAhqk95r   c           	          SSK Jn   " S SU5      nU" S5      nU" S5      nSnSnS nU R                  5       nU R                  [        UR
                  Xt4X5U5        g )	Nr   rJ   c                       \ rS rSrSrg)NComponentsTests.test_registerSubscriptionAdapter_w_nonblank_name.<locals>.IFooiC  r+   NrQ   r+   r   r   rV   r4  C  rW   r   rV   r   r   r^   c                     [        5       er   rh   r  s    r   rj   RComponentsTests.test_registerSubscriptionAdapter_w_nonblank_name.<locals>._factoryK  rl   r   )r`   rK   r   rq   rr   registerSubscriptionAdapter)	r   rK   rV   rb   r  r   rc   rj   r7   s	            r   0test_registerSubscriptionAdapter_w_nonblank_name@ComponentsTests.test_registerSubscriptionAdapter_w_nonblank_name@  sc    >	> 	 F|F|	( }})T%E%E"GT%	Ar   c                    SSK Jn  SSKJn  SSKJn   " S SU5      nU" S5      nU" S5      nSnS	nS
 n	U R                  5       n
U R                  5       u  pU   U
R                  X4UUS9  S S S 5        U
R                  R                  S   U   U   U   nU R                  [        U5      S5        U R                  US   U	5        U R                  U
R                  U4XWX4/5        U R                  [        U5      S5        US   u  pUu  nU R                  U0 5        U R                  UU5        U R                  UR                   U5        U R                  UR                   R"                  U
5        U R                  UR                   R$                  U5        U R                  UR                   R&                  U45        U R                  UR                   R(                  U5        U R                  UR                   R*                  U5        U R                  UR                   R,                  U	5        g ! , (       d  f       GN= f)Nr   rJ   rx   SubscriptionRegistrationc                       \ rS rSrSrg)]ComponentsTests.test_registerSubscriptionAdapter_w_explicit_provided_n_required.<locals>.IFooiW  r+   NrQ   r+   r   r   rV   r>  W  rW   r   rV   r   r   r^   c                     [        5       er   rh   r  s    r   rj   aComponentsTests.test_registerSubscriptionAdapter_w_explicit_provided_n_required.<locals>._factory_  rl   r   r_   r   r`   rK   r   ry   r   r<  r   r&   r7  r1   r   r-   r   r   r5   r0   rp   r   r   r  r   r^   ro   )r   rK   ry   r<  rV   rb   r  _blankrc   rj   r7   r%   r   r`  r   r   r   s                    r   ?test_registerSubscriptionAdapter_w_explicit_provided_n_requiredOComponentsTests.test_registerSubscriptionAdapter_w_explicit_provided_n_requiredR  s   >8D	> 	 F|F|	( }}++-,,Xw27 - 9  mm((+D1$7?S1%c!fh'99 7D(BC	EWq)1:R eZ0ell,DEell++T2ell++T2..8**F3ell''/ell**H5' Ws   H33
Ic                    SSK Jn  SSK Jn  SSKJn  SSKJn   " S SU5      nU" S5      nU" S5      nS	nS
n	U" U5       " S S5      5       n
U R                  5       nU R                  5       u  pU   UR                  X4US9  S S S 5        UR                  R                  S   U   U   U	   nU R                  [        U5      S5        U R                  US   U
5        U R                  UR                  U4XiX4/5        U R                  [        U5      S5        US   u  nnUu  nU R                  U0 5        U R!                  UU5        U R!                  UR"                  U5        U R                  UR"                  R$                  U5        U R                  UR"                  R&                  U5        U R                  UR"                  R(                  U45        U R                  UR"                  R*                  U	5        U R                  UR"                  R,                  U5        U R                  UR"                  R.                  U
5        g ! , (       d  f       GN= f)Nr   rJ   r  rx   r;  c                       \ rS rSrSrg)SComponentsTests.test_registerSubscriptionAdapter_wo_explicit_provided.<locals>.IFooi  r+   NrQ   r+   r   r   rV   rG    rW   r   rV   r   r^   r   c                       \ rS rSrSrg)WComponentsTests.test_registerSubscriptionAdapter_wo_explicit_provided.<locals>._Factoryi  r+   NrQ   r+   r   r   r  rI    r]   r   r  r_   r   )r`   rK   r  r   ry   r   r<  r   r&   r7  r1   r   r-   r   r   r5   r0   rp   r   r   r  r   r^   ro   )r   rK   r  ry   r<  rV   rb   r  rc   rB  r  r7   r%   r   r`  r   r   r   s                     r   5test_registerSubscriptionAdapter_wo_explicit_providedEComponentsTests.test_registerSubscriptionAdapter_wo_explicit_providedy  s   >;8D	> 	 F|F|	T		 	 
	 }}++-,,XwU,K mm((+D1$7?S1%c!fh'99 7D(BC	EWq)1:bR eZ0ell,DEell++T2ell++T2..8**F3ell''/ell**H5% Ws   1I
Ic                   ^ SSK Jn  SSKJn  SSKJn   " S SU5      nU" S5      nU" S5      mSnS	n " U4S
 jS5      nU R                  5       n	U R                  5       u  pU
   U	R                  XUS9  S S S 5        U	R                  R                  S   T   U   U   nU R                  [        U5      S5        U R                  US   U5        U R                  U	R                  T4XWX4/5        U R                  [        U5      S5        US   u  pUu  nU R                  U0 5        U R                  X5        U R                  UR                   U5        U R                  UR                   R"                  U	5        U R                  UR                   R$                  U5        U R                  UR                   R&                  T45        U R                  UR                   R(                  U5        U R                  UR                   R*                  U5        U R                  UR                   R,                  U5        g ! , (       d  f       GN= f)Nr   rJ   rx   r;  c                       \ rS rSrSrg)SComponentsTests.test_registerSubscriptionAdapter_wo_explicit_required.<locals>.IFooi  r+   NrQ   r+   r   r   rV   rN    rW   r   rV   r   r^   r   c                      > \ rS rSr Y 4rSrg)WComponentsTests.test_registerSubscriptionAdapter_wo_explicit_required.<locals>._Factoryi  r+   Nr  r  s   r   r  rP    r  r   r  )r   r^   r   rA  )r   rK   ry   r<  rV   rb   rc   rB  r  r7   r%   r   r`  r   r   r   r  s                   @r   5test_registerSubscriptionAdapter_wo_explicit_requiredEComponentsTests.test_registerSubscriptionAdapter_wo_explicit_required  s   >8D	> 	 F|F|	+ 	+ }}++-,,e -   mm((+D1$7?S1%c!fh'99 7D(BC	EWq)1:R e0ell,DEell++T2ell++T2..8**F3ell''/ell**H5) Ws   $H;;
I
c           	      (   SSK Jn   " S SU5      nU" S5      nU" S5      nSnS nU R                  5       nU R                  5       u  pU   UR	                  Xd4UUSS	9  S S S 5        U R                  [        U	5      S5        g ! , (       d  f       N*= f)
Nr   rJ   c                       \ rS rSrSrg)GComponentsTests.test_registerSubscriptionAdapter_wo_event.<locals>.IFooi  r+   NrQ   r+   r   r   rV   rU    rW   r   rV   r   r^   c                     [        5       er   rh   r  s    r   rj   KComponentsTests.test_registerSubscriptionAdapter_wo_event.<locals>._factory  rl   r   Fr^   r   )r`   rK   r   r&   r7  r-   r   )
r   rK   rV   rb   r  rc   rj   r7   r%   r   s
             r   )test_registerSubscriptionAdapter_wo_event9ComponentsTests.test_registerSubscriptionAdapter_wo_event  s    >	> 	 F|F|	( }}++-,,Xw27u - F  	Wq) Ws   B
Bc                 v    U R                  5       nU R                  [        UR                  5       5      / 5        g r   )r   r-   r   registeredSubscriptionAdaptersrA   s     r   )test_registeredSubscriptionAdapters_empty9ComponentsTests.test_registeredSubscriptionAdapters_empty  s+    }}dAACDbIr   c                 z   SSK Jn  SSKJn   " S SU5      nU" S5      nU" S5      nSnSn " S S	5      nU R	                  5       n	U	R                  X4XFS
9  U	R                  X4XFS
9  [        U	R                  5       5      n
U R                  [        U
5      S5        U R                  U
S   U5        U R                  U
S   R                  U	5        U R                  U
S   R                  U5        U R                  U
S   R                  U45        U R                  U
S   R                  U5        U R                  U
S   R                   U5        U R                  U
S   R"                  U5        U R                  U
S   U5        U R                  U
S   R                  U	5        U R                  U
S   R                  U5        U R                  U
S   R                  U45        U R                  U
S   R                  U5        U R                  U
S   R                   U5        U R                  U
S   R"                  U5        g )Nr   rJ   r;  c                       \ rS rSrSrg)JComponentsTests.test_registeredSubscriptionAdapters_notempty.<locals>.IFooi  r+   NrQ   r+   r   r   rV   ra    rW   r   rV   r^   r   c                       \ rS rSrSrg)NComponentsTests.test_registeredSubscriptionAdapters_notempty.<locals>._Factoryi  r+   NrQ   r+   r   r   r  rc    rW   r   r  r_   r   r   )r`   rK   r   r<  r   r7  r   r\  r-   r   r0   r   r   r   r  r   r^   ro   )r   rK   r<  rV   rb   r  rc   rB  r  r7   r`  s              r   ,test_registeredSubscriptionAdapters_notempty<ComponentsTests.test_registeredSubscriptionAdapters_notempty  s   >D	> 	 F|F|	 	 }}((7D(M((7D(M46689S1%c!f&>?c!foot,c!foot,Q4'2Qf-c!fkk5)c!fnnh/c!f&>?c!foot,c!foot,Q4'2Qf-c!fkk5)c!fnnh/r   c                     SSK Jn   " S SU5      nU" S5      nU" S5      nSnU R                  5       nU R                  [        UR
                  X4US9  g )Nr   rJ   c                       \ rS rSrSrg)PComponentsTests.test_unregisterSubscriptionAdapter_w_nonblank_name.<locals>.IFooi  r+   NrQ   r+   r   r   rV   rh    rW   r   rV   r   nonblank)r  r   r   r`   rK   r   rq   rr   unregisterSubscriptionAdapter)r   rK   rV   rb   r  	_nonblankr7   s          r   2test_unregisterSubscriptionAdapter_w_nonblank_nameBComponentsTests.test_unregisterSubscriptionAdapter_w_nonblank_name  sX    >	> 	 F|F|	}})T%G%G#'Y 	 	Hr   c                 d    U R                  5       nU R                  [        UR                  S S S9  g r  )r   rq   rr   rk  rA   s     r   ?test_unregisterSubscriptionAdapter_neither_factory_nor_providedOComponentsTests.test_unregisterSubscriptionAdapter_neither_factory_nor_provided  s/    }})T%G%G"& 	 	7r   c                     SSK Jn   " S SU5      nU" S5      nU R                  5       nU R                  [        UR
                  S US S9  g )Nr   rJ   c                       \ rS rSrSrg)]ComponentsTests.test_unregisterSubscriptionAdapter_neither_factory_nor_required.<locals>.IFooi  r+   NrQ   r+   r   r   rV   rt    rW   r   rV   r
  rj  rg  s        r   ?test_unregisterSubscriptionAdapter_neither_factory_nor_requiredOComponentsTests.test_unregisterSubscriptionAdapter_neither_factory_nor_required  sL    >	> 	 F|}})T%G%G"& 	 	Fr   c                 @   SSK Jn   " S SU5      nU" S5      nU" S5      n " S S5      nU R                  5       nU R                  5       u  pxU   UR	                  XT4U5      n	S S S 5        U R                  W	5        U R                  U5        g ! , (       d  f       N1= f)Nr   rJ   c                       \ rS rSrSrg)EComponentsTests.test_unregisterSubscriptionAdapter_miss.<locals>.IFooi$  r+   NrQ   r+   r   r   rV   ry  $  rW   r   rV   r   c                       \ rS rSrSrg)IComponentsTests.test_unregisterSubscriptionAdapter_miss.<locals>._Factoryi*  r+   NrQ   r+   r   r   r  r{  *  rW   r   r  )r`   rK   r   r&   rk  r  r  s
             r   'test_unregisterSubscriptionAdapter_miss7ComponentsTests.test_unregisterSubscriptionAdapter_miss!  s    >	> 	 F|F|	 	 }}++-66x$OE ! Ws   B
Bc                 r   SSK Jn  SSKJn  SSKJn   " S SU5      nU" S5      nU" S5      n " S S	5      nU R                  5       nUR                  Xv4U5        U R                  5       u  pU	   UR                  S U4U5      nS S S 5        U R                  W5        U R                  UR                  R                  5        U R                  UR                  5        U R                  [!        U
5      S
5        U
S   u  pUu  nU R                  U0 5        U R#                  X5        U R#                  UR$                  U5        U R'                  UR$                  R(                  U5        U R'                  UR$                  R*                  U5        U R                  UR$                  R,                  U45        U R                  UR$                  R.                  S5        U R                  UR$                  R0                  S5        U R3                  UR$                  R4                  5        g ! , (       d  f       GN= f)Nr   rJ   r   r;  c                       \ rS rSrSrg)OComponentsTests.test_unregisterSubscriptionAdapter_hit_wo_factory.<locals>.IFooi9  r+   NrQ   r+   r   r   rV   r  9  rW   r   rV   r   c                       \ rS rSrSrg)SComponentsTests.test_unregisterSubscriptionAdapter_hit_wo_factory.<locals>._Factoryi?  r+   NrQ   r+   r   r   r  r  ?  rW   r   r  r   r   )r`   rK   r   r   r   r<  r   r7  r&   rk  r  r  r1   r   r5   r-   r   r0   rp   r   r   r   r  r   r^   r   ro   r   rK   r   r<  rV   rb   r  r  r7   r%   r   r  r   r   r   s                  r   1test_unregisterSubscriptionAdapter_hit_wo_factoryAComponentsTests.test_unregisterSubscriptionAdapter_hit_wo_factory4  s   >:D	> 	 F|F|	 	 }}((7DA++-66tdWdKE 33499:Wq)1:R e2ell,DEell++T2ell++T2..8**B/**B/%,,../! Ws   /H''
H6c                 r   SSK Jn  SSKJn  SSKJn   " S SU5      nU" S5      nU" S5      n " S S	5      nU R                  5       nUR                  Xv4U5        U R                  5       u  pU	   UR                  Xv4U5      nS S S 5        U R                  W5        U R                  UR                  R                  5        U R                  UR                  5        U R                  [!        U
5      S
5        U
S   u  pUu  nU R                  U0 5        U R#                  X5        U R#                  UR$                  U5        U R'                  UR$                  R(                  U5        U R'                  UR$                  R*                  U5        U R                  UR$                  R,                  U45        U R                  UR$                  R.                  S5        U R                  UR$                  R0                  S5        U R'                  UR$                  R2                  U5        g ! , (       d  f       GN= f)Nr   rJ   r   r;  c                       \ rS rSrSrg)NComponentsTests.test_unregisterSubscriptionAdapter_hit_w_factory.<locals>.IFooi\  r+   NrQ   r+   r   r   rV   r  \  rW   r   rV   r   c                       \ rS rSrSrg)RComponentsTests.test_unregisterSubscriptionAdapter_hit_w_factory.<locals>._Factoryib  r+   NrQ   r+   r   r   r  r  b  rW   r   r  r   r   )r`   rK   r   r   r   r<  r   r7  r&   rk  r  r  r1   r   r5   r-   r   r0   rp   r   r   r   r  r   r^   ro   r  s                  r   0test_unregisterSubscriptionAdapter_hit_w_factory@ComponentsTests.test_unregisterSubscriptionAdapter_hit_w_factoryW  s   >:D	> 	 F|F|	 	 }}((7DA++-66x$OE 33499:Wq)1:R e2ell,DEell++T2ell++T2..8**B/**B/ell**H5! Wr  c                    SSK Jn  SSK Jn  SSKJn  SSKJn   " S SU5      nU" S5      nU" S5      nU" U5       " S	 S
5      5       nU R                  5       n	U	R                  X4U5        U R                  5       u  pU
   U	R                  X45      nS S S 5        U R                  W5        U R                  [        U5      S5        US   u  pUu  nU R                  U0 5        U R                  X5        U R                  UR                  U5        U R!                  UR                  R"                  U	5        U R!                  UR                  R$                  U5        U R                  UR                  R&                  U45        U R                  UR                  R(                  S5        U R                  UR                  R*                  S5        U R!                  UR                  R,                  U5        g ! , (       d  f       GNk= f)Nr   rJ   r  r   r;  c                       \ rS rSrSrg)UComponentsTests.test_unregisterSubscriptionAdapter_wo_explicit_provided.<locals>.IFooi  r+   NrQ   r+   r   r   rV   r    rW   r   rV   r   c                       \ rS rSrSrg)YComponentsTests.test_unregisterSubscriptionAdapter_wo_explicit_provided.<locals>._Factoryi  r+   NrQ   r+   r   r   r  r    r]   r   r  r   r   )r`   rK   r  r   r   r   r<  r   r7  r&   rk  r  r-   r   r0   rp   r   r   r   r  r   r^   ro   )r   rK   r  r   r<  rV   rb   r  r  r7   r%   r   r  r   r   r   s                   r   7test_unregisterSubscriptionAdapter_wo_explicit_providedGComponentsTests.test_unregisterSubscriptionAdapter_wo_explicit_providedz  s   >;:D	> 	 F|F|	T		 	 
	 }}((7DA++-66xIE Wq)1:R e2ell,DEell++T2ell++T2..8**B/**B/ell**H5 Wr$  c                   ^ SSK Jn  SSKJn  SSKJn   " S SU5      nU" S5      nU" S5      m " U4S jS	5      nU R                  5       nUR                  UT4U5        U R                  5       u  pU   UR                  XeS
9n
S S S 5        U R                  W
5        U R                  [        U	5      S5        U	S   u  pUu  nU R                  U0 5        U R                  X5        U R                  UR                  U5        U R                  UR                  R                   U5        U R                  UR                  R"                  U5        U R                  UR                  R$                  T45        U R                  UR                  R&                  S5        U R                  UR                  R(                  S5        U R                  UR                  R*                  U5        g ! , (       d  f       GNk= f)Nr   rJ   r   r;  c                       \ rS rSrSrg)UComponentsTests.test_unregisterSubscriptionAdapter_wo_explicit_required.<locals>.IFooi  r+   NrQ   r+   r   r   rV   r    rW   r   rV   r   c                      > \ rS rSr Y 4rSrg)YComponentsTests.test_unregisterSubscriptionAdapter_wo_explicit_required.<locals>._Factoryi  r+   Nr  r  s   r   r  r    r  r   r  r*  r   r   )r`   rK   r   r   r   r<  r   r7  r&   rk  r  r-   r   r0   rp   r   r   r   r  r   r^   ro   )r   rK   r   r<  rV   rb   r  r7   r%   r   r  r   r   r   r  s                 @r   7test_unregisterSubscriptionAdapter_wo_explicit_requiredGComponentsTests.test_unregisterSubscriptionAdapter_wo_explicit_required  s   >:D	> 	 F|F|	+ 	+ }}((D7DA++-66x6OE Wq)1:R e2ell,DEell++T2ell++T2..8**B/**B/ell**H5 Wr-  c                    SSK Jn  SSK Jn   " S SU5      nU" S5      nU" S5      nU R                  5       nU" U5       " S S5      5       nU" 5       nU R	                  [        UR                  U4U5      5      / 5        g )	Nr   rJ   r  c                       \ rS rSrSrg)4ComponentsTests.test_subscribers_empty.<locals>.IFooi  r+   NrQ   r+   r   r   rV   r    rW   r   rV   r   c                       \ rS rSrSrg)3ComponentsTests.test_subscribers_empty.<locals>.Bari  r+   NrQ   r+   r   r   Barr    r]   r   r  )r`   rK   r  r   r-   r   subscribers)	r   rK   r  rV   rb   r  r7   r  bars	            r   test_subscribers_empty&ComponentsTests.test_subscribers_empty  s|    >;	> 	 F|F|}}	T		 	 
	 ed..vt<=rBr   c                   ^ SSK Jn  SSK Jn   " S SU5      nU" S5      nU" S5      m " U4S jS5      n " S	 S
U5      nU R                  5       nUR	                  UT4U5        UR	                  UT4U5        U" T5       " S S5      5       nU" 5       n	UR                  U	4U5      n
S n[        XS9n
U R                  [        U
5      S5        U R                  U
S   U5        U R                  U
S   U5        g )Nr   rJ   r  c                       \ rS rSrSrg)8ComponentsTests.test_subscribers_non_empty.<locals>.IFooi  r+   NrQ   r+   r   r   rV   r    rW   r   rV   r   c                   $   > \ rS rSr Y 4rS rSrg)<ComponentsTests.test_subscribers_non_empty.<locals>._Factoryi  c                     Xl         g r   r?  rM  s     r   rC  EComponentsTests.test_subscribers_non_empty.<locals>._Factory.__init__  s     'r   r  N)r.   rR   rS   rT   r  rC  rU   r  s   r   r  r    s    $(7 (r   r  c                       \ rS rSrSrg)<ComponentsTests.test_subscribers_non_empty.<locals>._Derivedi  r+   NrQ   r+   r   r   _Derivedr    rW   r   r  c                       \ rS rSrSrg)7ComponentsTests.test_subscribers_non_empty.<locals>.Bari  r+   NrQ   r+   r   r   r  r    r]   r   r  c                 .    U R                   R                  $ r   )r   r.   xs    r   
_klassname>ComponentsTests.test_subscribers_non_empty.<locals>._klassname  s    ;;'''r   r]  r   r   )
r`   rK   r  r   r7  r  r_  r-   r   r0   )r   rK   r  rV   rb   r  r  r7   r  r  r  r  r  s               @r   test_subscribers_non_empty*ComponentsTests.test_subscribers_non_empty  s    >;	> 	 F|F|	( 	(	x 	 }}((D7DA((D7DA	T		 	 
	 e&&vt4	( [9[)1-k!nh7k!nh7r   c                     SSK Jn   " S SU5      nU" S5      nSnU R                  5       nS nU R                  [        UR
                  UX4S9  g )Nr   rJ   c                       \ rS rSrSrg)BComponentsTests.test_registerHandler_w_nonblank_name.<locals>.IFooi  r+   NrQ   r+   r   r   rV   r    rW   r   rV   ri  c                     [        5       er   rh   r  s    r   rj   FComponentsTests.test_registerHandler_w_nonblank_name.<locals>._factory 	  rl   r   r  r   )r`   rK   r   rq   rr   registerHandler)r   rK   rV   rb   rl  r7   rj   s          r   $test_registerHandler_w_nonblank_name4ComponentsTests.test_registerHandler_w_nonblank_name  sU    >	> 	 F|	}}	( 	)T%9%98#' 	 	9r   c                 *   SSK Jn  SSKJn  SSKJn   " S SU5      nU" S5      nSnSnS	 nU R                  5       n	U R                  5       u  pU
   U	R                  X4US
9  S S S 5        U	R                  R                  S   U   S    U   nU R                  [        U5      S5        U R                  US   U5        U R                  U	R                  U4XhU4/5        U R                  [        U5      S5        US   u  pUu  nU R                  U0 5        U R                  X5        U R                  UR                   U5        U R                  UR                   R"                  U	5        U R                  UR                   R$                  U45        U R                  UR                   R&                  U5        U R                  UR                   R(                  U5        U R                  UR                   R*                  U5        g ! , (       d  f       GN= f)Nr   rJ   rx   HandlerRegistrationc                       \ rS rSrSrg)FComponentsTests.test_registerHandler_w_explicit_required.<locals>.IFooi	  r+   NrQ   r+   r   r   rV   r  	  rW   r   rV   r   r^   c                     [        5       er   rh   r  s    r   rj   JComponentsTests.test_registerHandler_w_explicit_required.<locals>._factory	  rl   r   r_   r   )r`   rK   r   ry   r   r  r   r&   r  r1   r   r-   r   r   r6   r0   rp   r   r  r   r^   ro   )r   rK   ry   r  rV   rb   rB  rc   rj   r7   r%   r   r`  r   r   r   s                   r   (test_registerHandler_w_explicit_required8ComponentsTests.test_registerHandler_w_explicit_required	  s   >8?	> 	 F|	( }}++-  7 ? mm((+D1$7?S1%c!fh'44 7Fe<=	?Wq)1:R e0ell,?@ell++T2..8**F3ell''/ell**H5# Ws   H
Hc                   ^
 SSK Jn   " S SU5      nU" S5      m
SnSn " U
4S jS5      nU R                  5       nU R                  5       u  pxU   UR	                  XSS	S
9  S S S 5        UR
                  R                  S   T
   S    U   n	U R                  [        U	5      S5        U R                  U	S   U5        U R                  UR                  T
4XEU4/5        U R                  [        U5      S5        g ! , (       d  f       N= f)Nr   rJ   c                       \ rS rSrSrg)PComponentsTests.test_registerHandler_wo_explicit_required_no_event.<locals>.IFooi-	  r+   NrQ   r+   r   r   rV   r  -	  rW   r   rV   r^   r   c                      > \ rS rSr Y 4rSrg)TComponentsTests.test_registerHandler_wo_explicit_required_no_event.<locals>._Factoryi4	  r+   Nr  rb   s   r   r  r  4	  s    $(7 r   r  FrX  r   )r`   rK   r   r&   r  r1   r   r-   r   r   r6   )r   rK   rV   rc   rB  r  r7   r%   r   r`  rb   s             @r   2test_registerHandler_wo_explicit_required_no_eventBComponentsTests.test_registerHandler_wo_explicit_required_no_event*	  s    >	> 	 F|	 	 }}++-  U C mm((+D1$7?S1%c!fh'44 7Fe<=	?Wq) Ws   C88
Dc                 t    U R                  5       nU R                  [        UR                  5       5      5        g r   )r   r  r   registeredHandlersrA   s     r   test_registeredHandlers_empty-ComponentsTests.test_registeredHandlers_emptyC	  s)    }}d55789r   c                 j   SSK Jn  SSKJn   " S SU5      nU" S5      nS nS nU R	                  5       nUR                  XT45        UR                  Xd45        S n[        UR                  5       US	9n	U R                  [        U	5      S
5        U R                  U	S   U5        U R                  U	S   R                  U45        U R                  U	S   R                  S5        U R                  U	S   R                  U5        U R                  U	S   R                  S5        U R                  U	S   U5        U R                  U	S   R                  U45        U R                  U	S   R                  S5        U R                  U	S   R                  U5        U R                  U	S   R                  S5        g )Nr   rJ   r  c                       \ rS rSrSrg)?ComponentsTests.test_registeredHandlers_non_empty.<locals>.IFooiK	  r+   NrQ   r+   r   r   rV   r  K	  rW   r   rV   c                     [        5       er   rh   r  s    r   	_factory1DComponentsTests.test_registeredHandlers_non_empty.<locals>._factory1P	  rl   r   c                     [        5       er   rh   r  s    r   	_factory2DComponentsTests.test_registeredHandlers_non_empty.<locals>._factory2S	  rl   r   c                 B    U R                   R                  R                  $ r   )ro   __code__co_namer  s    r   _factory_nameHComponentsTests.test_registeredHandlers_non_empty.<locals>._factory_nameZ	  s    99%%---r   r]  r   r   r   )r`   rK   r   r  r   r  r_  r  r-   r   r0   r  r   ro   r^   )
r   rK   r  rV   rb   r  r  r7   r  r  s
             r   !test_registeredHandlers_non_empty1ComponentsTests.test_registeredHandlers_non_emptyG	  s   >?	> 	 F|	(	( }}Y0Y0	. T446MJ[)1-k!n.ABQ004':Q,,b1Q//;Q,,b1k!n.ABQ004':Q,,b1Q//;Q,,b1r   c                     SSK Jn   " S SU5      nU" S5      nSnU R                  5       nU R                  [        UR
                  U4US9  g )Nr   rJ   c                       \ rS rSrSrg)DComponentsTests.test_unregisterHandler_w_nonblank_name.<locals>.IFooim	  r+   NrQ   r+   r   r   rV   r  m	  rW   r   rV   ri  r  )r`   rK   r   rq   rr   unregisterHandler)r   rK   rV   rb   rl  r7   s         r   &test_unregisterHandler_w_nonblank_name6ComponentsTests.test_unregisterHandler_w_nonblank_namej	  sP    >	> 	 F|	}})T%;%;$(7 	 	<r   c                 d    U R                  5       nU R                  [        UR                  5        g r   )r   rq   rr   r  rA   s     r   3test_unregisterHandler_neither_factory_nor_requiredCComponentsTests.test_unregisterHandler_neither_factory_nor_requiredv	  s#    }})T%;%;<r   c                     SSK Jn   " S SU5      nU" S5      nU R                  5       nUR                  U4S9nU R	                  U5        g )Nr   rJ   c                       \ rS rSrSrg)9ComponentsTests.test_unregisterHandler_miss.<locals>.IFooi}	  r+   NrQ   r+   r   r   rV   r  }	  rW   r   rV   r  )r`   rK   r   r  r  )r   rK   rV   rb   r7   r  s         r   test_unregisterHandler_miss+ComponentsTests.test_unregisterHandler_missz	  sJ    >	> 	 F|}}&&&8r   c                 X   SSK Jn  SSKJn  SSKJn   " S SU5      nU" S5      nU R                  5       nS nU R                  5       nUR                  Xu45        U R                  5       u  pU   UR                  Xu45      n
S S S 5        U R                  W
5        U R                  [        U	5      S5        U	S   u  pUu  nU R                  U0 5        U R                  X5        U R                  UR                  U5        U R                  UR                  R                   U5        U R                  UR                  R"                  U45        U R                  UR                  R$                  S	5        U R                  UR                  R&                  U5        g ! , (       d  f       GN= f)
Nr   rJ   r   r  c                       \ rS rSrSrg)XComponentsTests.test_unregisterHandler_hit_w_factory_and_explicit_provided.<locals>.IFooi	  r+   NrQ   r+   r   r   rV   r  	  rW   r   rV   c                     [        5       er   rh   r  s    r   rj   \ComponentsTests.test_unregisterHandler_hit_w_factory_and_explicit_provided.<locals>._factory	  rl   r   r   r   )r`   rK   r   r   r   r  r   r  r&   r  r  r-   r   r0   rp   r   r   r  r   ro   r   rK   r   r  rV   rb   r7   rj   r%   r   r  r   r   r   s                 r   :test_unregisterHandler_hit_w_factory_and_explicit_providedJComponentsTests.test_unregisterHandler_hit_w_factory_and_explicit_provided	  sM   >:?	> 	 F|}}	( }}Xw/++-**8W=E Wq)1:R e2ell,?@ell++T2..8**B/ell**H5 Ws   /F
F)c                 R   SSK Jn  SSKJn  SSKJn   " S SU5      nU" S5      nU R                  5       nS nU R                  5       nUR                  Xu45        U R                  5       u  pU   UR                  U4S9n
S S S 5        U R                  W
5        U R                  [        U	5      S	5        U	S   u  pUu  nU R                  U0 5        U R                  X5        U R                  UR                  U5        U R                  UR                  R                   U5        U R                  UR                  R"                  U45        U R                  UR                  R$                  S
5        U R'                  UR                  R(                  5        g ! , (       d  f       GN= f)Nr   rJ   r   r  c                       \ rS rSrSrg)QComponentsTests.test_unregisterHandler_hit_w_only_explicit_provided.<locals>.IFooi	  r+   NrQ   r+   r   r   rV   r   	  rW   r   rV   c                     [        5       er   rh   r  s    r   rj   UComponentsTests.test_unregisterHandler_hit_w_only_explicit_provided.<locals>._factory	  rl   r   r  r   r   )r`   rK   r   r   r   r  r   r  r&   r  r  r-   r   r0   rp   r   r   r  r   r   ro   r  s                 r   3test_unregisterHandler_hit_w_only_explicit_providedCComponentsTests.test_unregisterHandler_hit_w_only_explicit_provided	  sP   >:?	> 	 F|}}	( }}Xw/++-**TG*<E Wq)1:R e2ell,?@ell++T2..8**B/%,,../ Ws   /F
F&c                   ^ SSK Jn  SSKJn  SSKJn   " S SU5      nU" S5      m " U4S jS5      nU R                  5       nUR                  U5        U R                  5       u  pxU   UR                  U5      n	S S S 5        U R                  W	5        U R                  [        U5      S	5        US   u  pU
u  nU R                  U0 5        U R                  X5        U R                  UR                  U5        U R                  UR                  R                   U5        U R                  UR                  R"                  T45        U R                  UR                  R$                  S
5        U R                  UR                  R&                  S
5        U R                  UR                  R(                  U5        g ! , (       d  f       GNE= f)Nr   rJ   r   r  c                       \ rS rSrSrg)IComponentsTests.test_unregisterHandler_wo_explicit_required.<locals>.IFooi	  r+   NrQ   r+   r   r   rV   r  	  rW   r   rV   c                      > \ rS rSr Y 4rSrg)MComponentsTests.test_unregisterHandler_wo_explicit_required.<locals>._Factoryi	  r+   Nr  r  s   r   r  r	  	  r  r   r  r   r   )r`   rK   r   r   r   r  r   r  r&   r  r  r-   r   r0   rp   r   r   r  r   r^   ro   )r   rK   r   r  rV   r  r7   r%   r   r  r   r   r   rb   s                @r   +test_unregisterHandler_wo_explicit_required;ComponentsTests.test_unregisterHandler_wo_explicit_required	  s^   >:?	> 	 F|	+ 	+ }}X&++-**84E Wq)1:R e2ell,?@ell++T2..8**B/**B/ell**H5 Ws   )F99
Gc                     SSK Jn  SSK Jn   " S SU5      nU" S5      nU R                  5       nU" U5       " S S5      5       nU" 5       nUR	                  U45        g )Nr   rJ   r  c                       \ rS rSrSrg)/ComponentsTests.test_handle_empty.<locals>.IFooi	  r+   NrQ   r+   r   r   rV   r  	  rW   r   rV   c                       \ rS rSrSrg).ComponentsTests.test_handle_empty.<locals>.Bari	  r+   NrQ   r+   r   r   r  r  	  r]   r   r  )r`   rK   r  r   handle)r   rK   r  rV   rb   r7   r  r  s           r   test_handle_empty!ComponentsTests.test_handle_empty	  s]    >;	> 	 F|}}	T		 	 
	 eSFr   c                 t  ^
^ SSK Jn  SSK Jn   " S SU5      nU" S5      n/ m
U
4S jn/ mU4S jnU R                  5       nUR	                  XT45        UR	                  Xd45        U" U5       " S S	5      5       nU" 5       n	UR                  U	5        U R                  T
U	/5        U R                  TU	/5        g )
Nr   rJ   r  c                       \ rS rSrSrg)3ComponentsTests.test_handle_non_empty.<locals>.IFooi	  r+   NrQ   r+   r   r   rV   r  	  rW   r   rV   c                 (   > TR                  U 5        g r   r   )r  	_called_1s    r   
_factory_19ComponentsTests.test_handle_non_empty.<locals>._factory_1	      W%r   c                 (   > TR                  U 5        g r   r   )r  	_called_2s    r   
_factory_29ComponentsTests.test_handle_non_empty.<locals>._factory_2
  r  r   c                       \ rS rSrSrg)2ComponentsTests.test_handle_non_empty.<locals>.Bari	
  r+   NrQ   r+   r   r   r  r!  	
  r]   r   r  )r`   rK   r  r   r  r  r-   )r   rK   r  rV   rb   r  r  r7   r  r  r  r  s             @@r   test_handle_non_empty%ComponentsTests.test_handle_non_empty	  s    >;	> 	 F|		& 		& }}Z1Z1	T		 	 
	 eCSE*SE*r   c                     " S S[         5      nU R                  5       n[        5       nU(       a  UO	[        5       nUR                  XBS9  UR                  XRSS9  U R	                  [        UR                  R                  5      S5        U R	                  UR                  R                  USU(       a  U4OXE400/5        U R	                  UR                  R                  X!(       a  SOS	05        UR                  XBS9nU R                  U5        UR                  XRSS9nU R                  U5        U R	                  UR                  R                  0 5        U R	                  [        UR                  R                  5      S
5        g )Nc                       \ rS rSrSrg)QComponentsTests.test_register_unregister_identical_objects_provided.<locals>.IFooi
  r+   NrQ   r+   r   r   rV   r&  
  rW   r   rV   r*  r  r+  r   r   r      r   )r   r   rp   ra   r-   r   r2   r   	_providedr   r  )r   	identicalrV   r7   firstsecondress          r   3test_register_unregister_identical_objects_providedCComponentsTests.test_register_unregister_identical_objects_provided
  sK   	9 	 }}#U2V?T^^8891=442IyE?C8
 7 	 	11y!a4
 	 $$U$:$$V$G1126T^^8891=r   c                 "    U R                  SS9  g )NF)r)  )r-  r   s    r   2test_register_unregister_nonequal_objects_providedBComponentsTests.test_register_unregister_nonequal_objects_provided0
  s    @@ 	A 	
r   c                     " S S[         5      n " S S5      nU R                  5       n[        S5       H  nUR                  U" 5       X S9  M     UR                  R
                  nUR                  R                  nU R                  [        U5      S5        U R                  [        US   5      S5        U R                  [        US   U   5      S5        UR                  R                  nU R                  [        U5      S5        U R                  [        US   5      S5        U R                  [        US   U   5      S5        U R                  [        US   U   S	   5      S5        [        U5      " 5       =oR                  l        UR                  0 5        0 =oS   U'   [        S
5       H$  n
[        [        U
5      5      n
US   U   U
   X'   M&     U R                  Xh5        [        U5      " 5       =oR                  l	        UR                  0 5        0 =oS   U'   SU	S	'   [        SS5       H0  n
[        [        U
5      5      n
US   U   U
   nU	S	==   U4-  ss'   M2     UR                  5       nU R                  UR                  R
                  U5        U R                  US
SSSS.5        UR                  SS9nU R                  UR                  R
                  US-   5        U R                  X5        U R                  X5        U R                  [        US   U   S	   5      [        US   U   S	   5      5        US   U   S	    H  nU R                  XS   U   S	   5        M     UR                  5       nU R                  USSSSS.5        UR                  SS9nU R                  UU5        U R                  UR                  R
                  US-   5        g )Nc                       \ rS rSrSrSrg)GComponentsTests.test_rebuildUtilityRegistryFromLocalCache.<locals>.IFooi7
  Does nothingr+   Nr.   rR   rS   rT   __doc__rU   r+   r   r   rV   r4  7
      r   rV   c                       \ rS rSrSrSrg)YComponentsTests.test_rebuildUtilityRegistryFromLocalCache.<locals>.UtilityImplementingFooi:
  r5  r+   Nr6  r+   r   r   UtilityImplementingFoor:  :
  r8  r   r;     rX  r   r   r   
   r+               r
   )did_not_registerneeded_registereddid_not_subscribeneeded_subscribedT)rebuild)r   r   rangera   r2   _generationr   r-   r   r   typer   strassertNotEqual$rebuildUtilityRegistryFromLocalCacheassertIn)r   rV   r;  compsiorig_generationorig_adaptersorig_subscribersnew_adaptersdr   new_subsr7   rebuild_preflightrebuild_resultsorig_subscriberpreflight_afterrebuild_afters                     r   )test_rebuildUtilityRegistryFromLocalCache9ComponentsTests.test_rebuildUtilityRegistryFromLocalCache5
  s   	9 		 	 rA!!&($s "  
  //5511]+Q/]1-.2]1-d34b9 ??77-.2-a0115-a067;-a06r:;R@ 483F3HH0B$&&OD!"IDs4y>D#A&t,T2AG  	M8267G2H2JJ??/ ""QK"!RLDs4y>D #D)$/DbEdWE ! "FFH44oF* "!#!"!#-
 	  DD E 

 	44o6IJ*<5D!"%& #D)"-.	0  0248<OMM/A;t+<R+@A  =  DDF "!"!#!"+
 	 BB C 
 	844o6IJr   r+   )test)T)xr.   rR   rS   rT   r   r   r&   r8   r<   rB   rG   rd   ru   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r  r  r  r$  r,  r2  r8  r>  rD  rI  rO  rR  ra  rh  rp  rv  r~  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   r  r  r  r  r"  r+  r0  r9  r@  rE  rV  r^  ri  r  r  r  r  r  r  r  r  r  r  r  r0  r8  rC  rJ  rQ  rY  r]  rd  rm  rp  ru  r|  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r
  r  r"  r-  r0  r[  rU   r   r   s   @r   r	   r	      s   9 :F=	= ,?0B6B
M 0D*"%,12(0TO$* C2C@G
?" 0@ 6D"0H#0JO&O&O.>8(*(.?*@3	K
8	G
6?A L$ ,$6L2"'6RA$G$(6T/6b(&6P*(7
	F $!6F!6F6B>"0H	=
12;(12*0X00d0
:B@N4B@5-1^F2AB(6TA$%6N&6P&6P*(J!0FH7
	F"&!0F!6F!6F6BC$$8L9 "6H*2:!2F
<=	 6>0>6>"+@ ><

[K [Kr   r	   c                   (   ^  \ rS rSrU 4S jrSrU =r$ )UnhashableComponentsTestsi
  c                 H   >  " S S[         [        U ]  5       [        5      nU$ )Nc                       \ rS rSrSrg)=UnhashableComponentsTests._getTargetClass.<locals>.Componentsi
  r+   NrQ   r+   r   r   r   rb  
  s     r   r   )r   r_  r   r   )r   r   r   s     r   r   )UnhashableComponentsTests._getTargetClass
  s%    	+TBDd	
 r   r+   )r.   rR   rS   rT   r   rU   r   r   s   @r   r_  r_  
  s    	 	r   r_  c                       \ rS rSrS rSS jrS rS rS rS r	S	 r
S
 rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rSrg)UtilityRegistrationTestsi
  c                     SSK Jn  U$ )Nr   rz   )r   r{   )r   r{   s     r   r   (UtilityRegistrationTests._getTargetClass
      ?""r   Nc                     SSK Jn   " S SU5      nU" S5      n " S S5      nU" 5       nSnS	n	U R                  5       n
U
" XuXX5      UU4$ )
Nr   rJ   c                       \ rS rSrSrg)AUtilityRegistrationTests._makeOne.<locals>.InterfaceClassSubclassi
  r+   NrQ   r+   r   r   InterfaceClassSubclassrk  
  rW   r   rl  rV   c                       \ rS rSrS rSrg)4UtilityRegistrationTests._makeOne.<locals>._Registryi
  c                     gN	_REGISTRYr+   r   s    r   __repr__=UtilityRegistrationTests._makeOne.<locals>._Registry.__repr__
      "r   r+   Nr.   rR   rS   rT   rr  rU   r+   r   r   	_Registryrn  
      #r   rv  r   	DOCSTRINGr`   rK   r   )r   rn   ro   rK   rl  rb   rv  r   r   docklasss              r   r   !UtilityRegistrationTests._makeOne
  sd    >	^ 	 &f-	# 	# ;$$&($3@
 	
r   c                 H    SSK Jn  SSKJn  U" XR	                  5       5        g )Nr   IUtilityRegistrationverifyClass)r   r  zope.interface.verifyr  r   )r   r  r  s      r   +test_class_conforms_to_IUtilityRegistrationDUtilityRegistrationTests.test_class_conforms_to_IUtilityRegistration
      B5(*>*>*@Ar   c                 T    SSK Jn  SSKJn  U R	                  5       u  n  nU" X5        g )Nr   r~  verifyObject)r   r  r  r  r   )r   r  r  ur_s        r   .test_instance_conforms_to_IUtilityRegistrationGUtilityRegistrationTests.test_instance_conforms_to_IUtilityRegistration
  "    B6==?Aq).r   c                      " S S5      nU" 5       nU R                  U5      u  p4nU R                  [        U5      SU-  5        g )Nc                       \ rS rSrSr Srg):UtilityRegistrationTests.test___repr__.<locals>._Componenti
  TESTr+   NrQ   r+   r   r   
_Componentr  
      Hr   r  zAUtilityRegistration(_REGISTRY, IFoo, %r, TEST, None, 'DOCSTRING')r?   r   r  
_componentr  	_registryr   s         r   rB   &UtilityRegistrationTests.test___repr__
  sK    	 	  \
#}}Z8uH@	
r   c                      " S S5      nU" 5       nU R                  U5      u  p4n[        5       Ul        U R                  [	        U5      SU-  5        g )Nc                       \ rS rSrS rSrg)KUtilityRegistrationTests.test___repr___provided_wo_name.<locals>._Componenti
  c                     gNr  r+   r   s    r   rr  TUtilityRegistrationTests.test___repr___provided_wo_name.<locals>._Component.__repr__
      r   r+   Nru  r+   r   r   r  r  
      r   r  AUtilityRegistration(_REGISTRY, None, %r, TEST, None, 'DOCSTRING')r   rp   r   r-   r@   r  s         r   test___repr___provided_wo_name7UtilityRegistrationTests.test___repr___provided_wo_name
  T    	 	  \
#}}Z8uhH@	
r   c                      " S S5      nU" 5       nU R                  U5      u  p4n[        5       Ul        U R                  [	        U5      SU-  5        g )Nc                       \ rS rSrS rSrg)LUtilityRegistrationTests.test___repr___component_wo_name.<locals>._Componenti
  c                     gr  r+   r   s    r   rr  UUtilityRegistrationTests.test___repr___component_wo_name.<locals>._Component.__repr__
  r  r   r+   Nru  r+   r   r   r  r  
  r  r   r  r  r  r  s         r   test___repr___component_wo_name8UtilityRegistrationTests.test___repr___component_wo_name
  r  r   c                     [        5       nU R                  U5      u  p#nU R                  UR                  5       [	        U5      5        g r   rp   r   r-   __hash__idr   r  r  r  r   s        r   test___hash__&UtilityRegistrationTests.test___hash__
  6    X
#}}Z8u2/r   c                 b    [        5       nU R                  U5      u  p#nU R                  X"5        g r   rp   r   r-   r  s        r   test___eq___identity-UtilityRegistrationTests.test___eq___identity
  *    X
#}}Z8u r   c                     [        5       nU R                  U5      u  p#nU R                  U5      u  n  nU R                  X%5        g r   r  r   r  r  r  r   ur2r  s          r   test___eq___hit(UtilityRegistrationTests.test___eq___hit  >    X
#}}Z8uMM*-	Q!r   c                     [        5       n[        5       nU R                  U5      u  p4nU R                  U5      u  n  nU R                  X65        g r   rp   r   rK  r   r  _component2r  r  r   r  r  s           r   test___eq___miss)UtilityRegistrationTests.test___eq___miss	  E    X
h#}}Z8uMM+.	QB$r   c                 b    [        5       nU R                  U5      u  p#nU R                  X"5        g r   r  r  s        r   test___ne___identity-UtilityRegistrationTests.test___ne___identity  r  r   c                     [        5       nU R                  U5      u  p#nU R                  U5      u  n  nU R                  X%5        g r   r  r  s          r   test___ne___hit(UtilityRegistrationTests.test___ne___hit  r  r   c                     [        5       n[        5       nU R                  U5      u  p4nU R                  U5      u  n  nU R                  X65        g r   r  r  s           r   test___ne___miss)UtilityRegistrationTests.test___ne___miss  r  r   c                 f    [        5       nU R                  U5      u  p#nU R                  X":  5        g r   rp   r   r  r  s        r   test___lt___identity-UtilityRegistrationTests.test___lt___identity"  ,    X
#}}Z8u!r   c                     [        5       nU R                  U5      u  p#nU R                  U5      u  n  nU R                  X%:  5        g r   r  r  s          r   test___lt___hit(UtilityRegistrationTests.test___lt___hit'  @    X
#}}Z8uMM*-	Q"r   c                     [        5       n[        5       nU R                  U5      u  p4nU R                  U5      u  n  nUS-   Ul        U R                  X65        g N2rp   r   r   
assertLessr  s           r   test___lt___miss)UtilityRegistrationTests.test___lt___miss-  N    X
h#}}Z8uMM+.	Q3; r   c                 b    [        5       nU R                  U5      u  p#nU R                  X"5        g r   rp   r   assertLessEqualr  s        r   test___le___identity-UtilityRegistrationTests.test___le___identity5  *    X
#}}Z8uR$r   c                     [        5       nU R                  U5      u  p#nU R                  U5      u  n  nU R                  X%5        g r   r  r  s          r   test___le___hit(UtilityRegistrationTests.test___le___hit:  >    X
#}}Z8uMM*-	QR%r   c                     [        5       n[        5       nU R                  U5      u  p4nU R                  U5      u  n  nUS-   Ul        U R                  X65        g r  rp   r   r   r  r  s           r   test___le___miss)UtilityRegistrationTests.test___le___miss@  P    X
h#}}Z8uMM+.	Q3;R%r   c                 f    [        5       nU R                  U5      u  p#nU R                  X":  5        g r   r  r  s        r   test___gt___identity-UtilityRegistrationTests.test___gt___identityH  r  r   c                     [        5       n[        5       nU R                  U5      u  p4nU R                  U5      u  n  nUS-   Ul        U R                  Xc5        g r  rp   r   r   assertGreaterr  s           r   test___gt___hit(UtilityRegistrationTests.test___gt___hitM  P    X
h#}}Z8uMM+.	Q3;3#r   c                     [        5       nU R                  U5      u  p#nU R                  U5      u  n  nU R                  XR:  5        g r   r  r  s          r   test___gt___miss)UtilityRegistrationTests.test___gt___missU  @    X
#}}Z8uMM*-	Q"r   c                 b    [        5       nU R                  U5      u  p#nU R                  X"5        g r   rp   r   assertGreaterEqualr  s        r   test___ge___identity-UtilityRegistrationTests.test___ge___identity[  *    X
#}}Z8u'r   c                     [        5       n[        5       nU R                  U5      u  p4nU R                  U5      u  n  nUS-   Ul        U R                  X6:  5        g r  rp   r   r   r  r  s           r   test___ge___miss)UtilityRegistrationTests.test___ge___miss`  R    X
h#}}Z8uMM+.	Q3;#r   c                     [        5       nU R                  U5      u  p#nU R                  U5      u  n  nUS-   Ul        U R                  XR5        g r  rp   r   r   r  r  s          r   test___ge___hit(UtilityRegistrationTests.test___ge___hith  I    X
#}}Z8uMM*-	Q3;(r   r+   )NN)r.   rR   rS   rT   r   r   r  r  rB   r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r	  rU   r+   r   r   re  re  
  s    #
,B
/

 
 0
!
"%!
"%"
#!%
&&"
$#(
$)r   re  c                       \ rS rSrS rS S jrS rS rS rS r	S	 r
S
 rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rS rSr g)!AdapterRegistrationTestsip  c                     SSK Jn  U$ )Nr   r  )r   r  )r   r  s     r   r   (AdapterRegistrationTests._getTargetClassr  rh  r   Nc                     SSK Jn   " S SU5      nU" S5      nU" S5      n " S S5      nU" 5       nSnS	n	U R                  5       n
U
" Xu4XHX5      UU4$ )
Nr   rJ   c                       \ rS rSrSrg)/AdapterRegistrationTests._makeOne.<locals>.IFooiy  r+   NrQ   r+   r   r   rV   r  y  rW   r   rV   r   c                       \ rS rSrS rSrg)4AdapterRegistrationTests._makeOne.<locals>._Registryi  c                     grp  r+   r   s    r   rr  =AdapterRegistrationTests._makeOne.<locals>._Registry.__repr__  rt  r   r+   Nru  r+   r   r   rv  r    rw  r   rv  r   rx  ry  r   rn   rK   rV   rb   r  rv  r   r   rz  r{  s              r   r   !AdapterRegistrationTests._makeOnev  n    >	> 	 F|F|	# 	# ;$$&(GT@
 	
r   c                 H    SSK Jn  SSKJn  U" XR	                  5       5        g )Nr   IAdapterRegistrationr  )r   r  r  r  r   )r   r  r  s      r   +test_class_conforms_to_IAdapterRegistrationDAdapterRegistrationTests.test_class_conforms_to_IAdapterRegistration  r  r   c                 T    SSK Jn  SSKJn  U R	                  5       u  n  nU" X5        g )Nr   r  r  )r   r  r  r  r   )r   r  r  arr  s        r   .test_instance_conforms_to_IAdapterRegistrationGAdapterRegistrationTests.test_instance_conforms_to_IAdapterRegistration  r  r   c                      " S S5      nU" 5       nU R                  U5      u  p4nU R                  [        U5      SU-  5        g )Nc                       \ rS rSrSr Srg):AdapterRegistrationTests.test___repr__.<locals>._Componenti  r  r+   NrQ   r+   r   r   r  r%    r  r   r  zCAdapterRegistration(_REGISTRY, [IBar], IFoo, %r, TEST, 'DOCSTRING')r?   r   r  r  r   r  r   s         r   rB   &AdapterRegistrationTests.test___repr__  sJ    	 	  \
#}}Z8uH	
r   c                      " S S5      nU" 5       nU R                  U5      u  p4n[        5       Ul        U R                  [	        U5      SU-  5        g )Nc                       \ rS rSrS rSrg)KAdapterRegistrationTests.test___repr___provided_wo_name.<locals>._Componenti  c                     gr  r+   r   s    r   rr  TAdapterRegistrationTests.test___repr___provided_wo_name.<locals>._Component.__repr__  r  r   r+   Nru  r+   r   r   r  r*    r  r   r  CAdapterRegistration(_REGISTRY, [IBar], None, %r, TEST, 'DOCSTRING')r  r&  s         r   r  7AdapterRegistrationTests.test___repr___provided_wo_name  S    	 	  \
#}}Z8uhH	
r   c                      " S S5      nU" 5       nU R                  U5      u  p4n[        5       Ul        U R                  [	        U5      SU-  5        g )Nc                       \ rS rSrS rSrg)LAdapterRegistrationTests.test___repr___component_wo_name.<locals>._Componenti  c                     gr  r+   r   s    r   rr  UAdapterRegistrationTests.test___repr___component_wo_name.<locals>._Component.__repr__  r  r   r+   Nru  r+   r   r   r  r2    r  r   r  r-  r  r&  s         r   r  8AdapterRegistrationTests.test___repr___component_wo_name  r/  r   c                     [        5       nU R                  U5      u  p#nU R                  UR                  5       [	        U5      5        g r   r  r   r  r   r  r   s        r   r  &AdapterRegistrationTests.test___hash__  r  r   c                 b    [        5       nU R                  U5      u  p#nU R                  X"5        g r   r  r7  s        r   r  -AdapterRegistrationTests.test___eq___identity  r  r   c                     [        5       nU R                  U5      u  p#nU R                  U5      u  n  nU R                  X%5        g r   r  r   r  r   r  r   ar2r  s          r   r  (AdapterRegistrationTests.test___eq___hit  r  r   c                     [        5       n[        5       nU R                  U5      u  p4nU R                  U5      u  n  nU R                  X65        g r   r  r   r  r  r   r  r   r=  r  s           r   r  )AdapterRegistrationTests.test___eq___miss  r  r   c                 b    [        5       nU R                  U5      u  p#nU R                  X"5        g r   r  r7  s        r   r  -AdapterRegistrationTests.test___ne___identity  r  r   c                     [        5       nU R                  U5      u  p#nU R                  U5      u  n  nU R                  X%5        g r   r  r<  s          r   r  )AdapterRegistrationTests.test___ne___miss  r  r   c                     [        5       n[        5       nU R                  U5      u  p4nU R                  U5      u  n  nU R                  X65        g r   r  r@  s           r   test___ne___hit_component2AdapterRegistrationTests.test___ne___hit_component  r  r   c                     SSK Jn   " S SU5      nU" S5      n[        5       nU R                  U5      u  pVnU R                  U5      u  n  n	X8l        U R                  XX5        g )Nr   rJ   c                       \ rS rSrSrg)?AdapterRegistrationTests.test___ne___hit_provided.<locals>.IFooi  r+   NrQ   r+   r   r   rV   rK    rW   r   rV   r  )r`   rK   rp   r   r   rK  )
r   rK   rV   r  r  r   r  r   r=  r  s
             r   test___ne___hit_provided1AdapterRegistrationTests.test___ne___hit_provided  s]    >	> 	 F|X
#}}Z8uMM*-	QB$r   c                     SSK Jn   " S SU5      nU" S5      n[        5       n[        5       nU R                  U5      u  pgnU R                  U5      u  n	  n
U4U	l        U R                  Xi5        g )Nr   rJ   c                       \ rS rSrSrg)?AdapterRegistrationTests.test___ne___hit_required.<locals>.IFooi  r+   NrQ   r+   r   r   rV   rP    rW   r   rV   r  )r`   rK   rp   r   r  rK  )r   rK   rV   r  r  r  r   r  r   r=  r  s              r   test___ne___hit_required1AdapterRegistrationTests.test___ne___hit_required  sh    >	> 	 F|X
h#}}Z8uMM+.	QwB$r   c                 f    [        5       nU R                  U5      u  p#nU R                  X":  5        g r   r  r7  s        r   r  -AdapterRegistrationTests.test___lt___identity
  r  r   c                     [        5       nU R                  U5      u  p#nU R                  U5      u  n  nU R                  X%:  5        g r   r  r<  s          r   r  (AdapterRegistrationTests.test___lt___hit  r  r   c                     [        5       n[        5       nU R                  U5      u  p4nU R                  U5      u  n  nUS-   Ul        U R                  X65        g r  r  r@  s           r   r  )AdapterRegistrationTests.test___lt___miss  r  r   c                 b    [        5       nU R                  U5      u  p#nU R                  X"5        g r   r  r7  s        r   r  -AdapterRegistrationTests.test___le___identity  r  r   c                     [        5       nU R                  U5      u  p#nU R                  U5      u  n  nU R                  X%5        g r   r  r<  s          r   r  (AdapterRegistrationTests.test___le___hit"  r  r   c                     [        5       n[        5       nU R                  U5      u  p4nU R                  U5      u  n  nUS-   Ul        U R                  X65        g r  r  r@  s           r   r  )AdapterRegistrationTests.test___le___miss(  r  r   c                 f    [        5       nU R                  U5      u  p#nU R                  X":  5        g r   r  r7  s        r   r  -AdapterRegistrationTests.test___gt___identity0  r  r   c                     [        5       n[        5       nU R                  U5      u  p4nU R                  U5      u  n  nUS-   Ul        U R                  Xc5        g r  r  r@  s           r   r  (AdapterRegistrationTests.test___gt___hit5  r  r   c                     [        5       nU R                  U5      u  p#nU R                  U5      u  n  nU R                  XR:  5        g r   r  r<  s          r   r  )AdapterRegistrationTests.test___gt___miss=  r  r   c                 b    [        5       nU R                  U5      u  p#nU R                  X"5        g r   r  r7  s        r   r  -AdapterRegistrationTests.test___ge___identityC  r  r   c                     [        5       n[        5       nU R                  U5      u  p4nU R                  U5      u  n  nUS-   Ul        U R                  X6:  5        g r  r  r@  s           r   r  )AdapterRegistrationTests.test___ge___missH  r  r   c                     [        5       nU R                  U5      u  p#nU R                  U5      u  n  nUS-   Ul        U R                  XR5        g r  r  r<  s          r   r	  (AdapterRegistrationTests.test___ge___hitP  r  r   r+   r   )!r.   rR   rS   rT   r   r   r  r!  rB   r  r  r  r  r  r  r  r  rG  rL  rQ  r  r  r  r  r  r  r  r  r  r  r  r	  rU   r+   r   r   r  r  p  s    #
.B
/

 
 0
!
"%!
"%%%"
#!%
&&"
$#(
$)r   r  c                   0    \ rS rSrS rSS jrS rS rSrg)	SubscriptionRegistrationTestsiX  c                     SSK Jn  U$ )Nr   r;  )r   r<  )r   r<  s     r   r   -SubscriptionRegistrationTests._getTargetClassZ  s    D''r   Nc                     SSK Jn   " S SU5      nU" S5      nU" S5      n " S S5      nU" 5       nSnS	n	U R                  5       n
U
" Xu4XHX5      UU4$ )
Nr   rJ   c                       \ rS rSrSrg)4SubscriptionRegistrationTests._makeOne.<locals>.IFooia  r+   NrQ   r+   r   r   rV   rq  a  rW   r   rV   r   c                       \ rS rSrS rSrg)9SubscriptionRegistrationTests._makeOne.<locals>._Registryig  c                     grp  r+   r   s    r   rr  BSubscriptionRegistrationTests._makeOne.<locals>._Registry.__repr__h  rt  r   r+   Nru  r+   r   r   rv  rs  g  rw  r   rv  r   rx  ry  r  s              r   r   &SubscriptionRegistrationTests._makeOne^  r  r   c                 H    SSK Jn  SSKJn  U" XR	                  5       5        g )Nr    ISubscriptionAdapterRegistrationr  )r   ry  r  r  r   )r   ry  r  s      r   7test_class_conforms_to_ISubscriptionAdapterRegistrationUSubscriptionRegistrationTests.test_class_conforms_to_ISubscriptionAdapterRegistrationu  s    N546J6J6LMr   c                 T    SSK Jn  SSKJn  U R	                  5       u  n  nU" X5        g )Nr   rx  r  )r   ry  r  r  r   )r   ry  r  sarr  s        r   :test_instance_conforms_to_ISubscriptionAdapterRegistrationXSubscriptionRegistrationTests.test_instance_conforms_to_ISubscriptionAdapterRegistrationz  s"    N6MMO	Q5;r   r+   r   )	r.   rR   rS   rT   r   r   rz  r~  rU   r+   r   r   rl  rl  X  s    (
.N
<r   rl  c                   B    \ rS rSrS rSS jrS rS rS rS r	S	 r
S
rg)HandlerRegistrationTestsi  c                     SSK Jn  U$ )Nr   r  )r   r  )r   r  s     r   r   (HandlerRegistrationTests._getTargetClass  rh  r   Nc                     SSK Jn   " S SU5      nU" S5      n " S S5      nU" 5       nSnSnU R                  5       n	U	" Xd4XqU5      UU4$ )	Nr   rJ   c                       \ rS rSrSrg)/HandlerRegistrationTests._makeOne.<locals>.IFooi  r+   NrQ   r+   r   r   rV   r    rW   r   rV   c                       \ rS rSrS rSrg)4HandlerRegistrationTests._makeOne.<locals>._Registryi  c                     grp  r+   r   s    r   rr  =HandlerRegistrationTests._makeOne.<locals>._Registry.__repr__  rt  r   r+   Nru  r+   r   r   rv  r    rw  r   rv  r   rx  ry  )
r   rn   rK   rV   rb   rv  r   r   rz  r{  s
             r   r   !HandlerRegistrationTests._makeOne  se    >	> 	 F|	# 	# ;$$&(GTc:
 	
r   c                 H    SSK Jn  SSKJn  U" XR	                  5       5        g )Nr   IHandlerRegistrationr  )r   r  r  r  r   )r   r  r  s      r   +test_class_conforms_to_IHandlerRegistrationDHandlerRegistrationTests.test_class_conforms_to_IHandlerRegistration  r  r   c                 T    SSK Jn  SSKJn  U R	                  5       u  n  nU" X5        g )Nr   r  r  )r   r  r  r  r   )r   r  r  hrr  s        r   .test_instance_conforms_to_IHandlerRegistrationGHandlerRegistrationTests.test_instance_conforms_to_IHandlerRegistration  r  r   c                     S nU R                  U5      u  n  nU R                  UR                  U5        U R                  UR                  UR                  5        U R	                  UR
                  5        g )Nc                     [        5       er   rh   r  s    r   rj   :HandlerRegistrationTests.test_properties.<locals>._factory  rl   r   )r   r   handlerro   r   r   )r   rj   r  r  s       r   test_properties(HandlerRegistrationTests.test_properties  sU    	(==*Aqbjj(+bjj"**-"++&r   c                      " S S5      nU R                  U" 5       5      u  p#nU R                  [        U5      SU-  5        g )Nc                       \ rS rSrSr Srg)GHandlerRegistrationTests.test___repr___factory_w_name.<locals>._Factoryi  r  r+   NrQ   r+   r   r   r  r    r  r   r  =HandlerRegistration(_REGISTRY, [IFoo], %r, TEST, 'DOCSTRING')r?   r   r  r  r  r   s        r   test___repr___factory_w_name5HandlerRegistrationTests.test___repr___factory_w_name  sE    	 	  $}}XZ8uH	r   c                      " S S5      nU R                  U" 5       5      u  p#nU R                  [        U5      SU-  5        g )Nc                       \ rS rSrS rSrg)HHandlerRegistrationTests.test___repr___factory_wo_name.<locals>._Factoryi  c                     gr  r+   r   s    r   rr  QHandlerRegistrationTests.test___repr___factory_wo_name.<locals>._Factory.__repr__  r  r   r+   Nru  r+   r   r   r  r    r  r   r  r  r?   r  s        r   test___repr___factory_wo_name6HandlerRegistrationTests.test___repr___factory_wo_name  sE    	 	  $}}XZ8uH	
r   r+   r   )r.   rR   rS   rT   r   r   r  r  r  r  r  rU   r+   r   r   r  r    s&    #
,B
/'

r   r  c                        \ rS rSrS rS rSrg)PersistentAdapterRegistryi  c                     U R                   R                  5       n[        U5       H;  nX R                  ;   d  UR	                  S5      (       d  M*  UR                  U5        M=     UR                  SS 5        U$ )N_vro)__dict__copyr   
_delegated
startswithpop)r   stateks      r   __getstate__&PersistentAdapterRegistry.__getstate__  sZ    ""$eAOO#q||D'9'9		!  			$r   c                     UR                  SS5      nU R                  R                  U5        U R                  5         X l        U R
                  R                  U 5        g )Nr/   r+   )r  r  update_createLookupr/   r  r  )r   r  basess      r   __setstate__&PersistentAdapterRegistry.__setstate__  sG    		+r*U#t$r   )r/   N)r.   rR   rS   rT   r  r  rU   r+   r   r   r  r    s    %r   r  c                       \ rS rSrS rSrg)PersistentComponentsi  c                 @    [        5       U l        [        5       U l        g r   )r  r1   r2   r   s    r   _init_registries%PersistentComponents._init_registries  s    1324r   )r1   r2   N)r.   rR   rS   rT   r  rU   r+   r   r   r  r    s    5r   r  c                       \ rS rSrSrg)PersistentDictComponentsi  r+   NrQ   r+   r   r   r  r    s    r   r  c                       \ rS rSrS rSrg)PersistentComponentsDicti  c                 X    [         R                  U 5        [        R                  X5        g r   )r   rC  r  )r   r   s     r   rC  !PersistentComponentsDict.__init__  s    d%%d1r   r+   NrP  r+   r   r   r  r    s    2r   r  c                   ,    \ rS rSrS rS rS rS rSrg)TestPersistentComponentsi  c                     [        S5      $ )Nr]  )r  r   s    r   r   !TestPersistentComponents._makeOne  s    #F++r   c                     g r   r+   r   mades     r   _check_equality_after_pickle5TestPersistentComponents._check_equality_after_pickle  s    r   c                     SS K nU R                  5       nUR                  U5        UR                  UR                  U5      5      nU R	                  UR
                  S5        g Nr   r]  )pickler   dumpsloadsr-   r.   )r   r  r7   comp2s       r   test_pickles_empty+TestPersistentComponents.test_pickles_empty  sG    }}TV\\$/00r   c                    SS K nU R                  5       n[        5       nUR                  U[        5        U R                  UUR                  [        5      5        UR                  UR                  U5      5      nU R                  UR                  S5        U R                  UR                  [        5      5        UR                  U[        5        U R                  UUR                  [        5      5        U R                  U5        g r  )r  r   rp   ra   r   r   r}  r  r  r-   r.   assertIsNotNoner  )r   r  r7   utilityr  s        r   &test_pickles_with_utility_registration?TestPersistentComponents.test_pickles_with_utility_registration  s    }}(	 	gooi0	2 V\\$/00 	U--i89 		 	g&&y1	3 	))%0r   r+   N)	r.   rR   rS   rT   r   r  r  r  rU   r+   r   r   r  r    s    ,11r   r  c                   &    \ rS rSrS rS rS rSrg)TestPersistentDictComponentsi  c                     [         $ r   )r  r   s    r   r   ,TestPersistentDictComponents._getTargetClass      ''r   c                 8    U R                  5       " SS9nSUS'   U$ )Nr]  rX  *   r^  r   rA   s     r   r   %TestPersistentDictComponents._makeOne"  s#    ##%62Ur   c                 R    U R                  SU5        U R                  US   S5        g )Nr^  r  )rM  r-   r  s     r   r  9TestPersistentDictComponents._check_equality_after_pickle'  s$    eT"eb)r   r+   N)r.   rR   rS   rT   r   r   r  rU   r+   r   r   r  r    s    (
*r   r  c                       \ rS rSrS rSrg)TestPersistentComponentsDicti,  c                     [         $ r   )r  r   s    r   r   ,TestPersistentComponentsDict._getTargetClass.  r  r   r+   N)r.   rR   rS   rT   r   rU   r+   r   r   r  r  ,  s    (r   r  c                   &    \ rS rSrS rS rS rSrg)r$   i2  c                     Xl         U Vs0 s H  o3[        X5      _M     snU l        UR                  5        H  u  p4[	        XU5        M     g s  snf r   )modulegetattr
to_restoreitemssetattr)r   r  r   r^  values        r   rC  _Monkey.__init__4  sG    @BC 44C((*JCF' % Ds   Ac                     U $ r   r+   r   s    r   	__enter___Monkey.__enter__:  s    r   c                 v    U R                   R                  5        H  u  pE[        U R                  XE5        M     g r   )r  r  r  r  )r   exc_typeexc_valexc_tbr^  r  s         r   __exit___Monkey.__exit__=  s)    ////1JCDKK, 2r   )r  r  N)r.   rR   rS   rT   rC  r  r  rU   r+   r   r   r$   r$   2  s    (-r   r$   )r7  unittestr#   r   r,   r   r   r   TestCaser	   r_  re  r  rl  r  r  r  r   r  r  r  r  r  r$   r+   r   r   <module>r      s      $ ; .y)Kh'' y)KxS "I)x00 I)Xe)x00 e)P&<H$5$5 &<RG
x00 G
T% 8 %$5: 5	3T 	
2t%9 2(1x00 (1V*#; *(#? (- -r   