
    (phD                    H   S r SSKrSSKJr  SSKJr  SSKJr  SSKJr   " S S5      r " S	 S
\R                  5      r
 " S S\R                  5      r " S S\5      r " S S\5      r " S S\\R                  5      r " S S\R                  5      r " S S\\5      r " S S5      r " S S\\R                  5      r " S S\\R                  5      r " S S\5      r " S S \R                  5      r " S! S"\5      r " S# S$\5      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/ S0\R                  5      r " S1 S2\R                  5      r " S3 S4\R                  5      r " S5 S6\\\5      r  " S7 S8\R                  5      r! " S9 S:\!5      r" " S; S<\R                  5      r# " S= S>\R                  5      r$ " S? S@\R                  5      r% " SA SB\R                  5      r& " SC SD\R                  5      r' " SE SF\'\5      r( " SG SH\R                  5      r) " SI SJ\)\5      r* " SK SL\R                  5      r+ " SM SN\+\\5      r, " SO SP5      r- " SQ SR5      r.g)Sz@Test the new API for making and checking interface declarations
    N)MissingSomeAttrs)OptimizationTestMixin)SubclassableMixin)!NameAndModuleComparisonTestsMixinc                        \ rS rSr SS jrSrg)_Py3ClassAdvice   c                     SS K nUR                  SS9 nUR                  5          [        XU5        U(       a  U R	                  S5         S S S 5        g ! [
         a     S S S 5        gf = f! , (       d  f       g = f)Nr   T)recordzDidn't raise TypeErrorF)warningscatch_warningsresetwarningsexecfail	TypeError)selfcodeglobslocsfails_under_py3kr   _s          Y/var/www/html/venv/lib/python3.13/site-packages/zope/interface/tests/test_declarations.py_run_generated_code#_Py3ClassAdvice._run_generated_code   sw     	$$D$1Q""$8T$' $II67 21
   21
 21s-   A,AA,
A)A,(A))A,,
A: N)T)__name__
__module____qualname____firstlineno__r   __static_attributes__r       r   r   r      s     37r!   r   c                   &    \ rS rSrS rS rS rSrg)
NamedTests0   c                 r    SSK Jn  U" S5       " S S5      5       nU R                  UR                  S5        g )Nr   namedfooc                       \ rS rSrSrg)"NamedTests.test_class.<locals>.Foo5   r   Nr   r   r   r   r    r   r!   r   Foor*   5       r!   r-   zope.interface.declarationsr'   assertEqual__component_name__)r   r'   r-   s      r   
test_classNamedTests.test_class2   s;    5	u	 	 
	 	""E	
r!   c                 d    SSK Jn  U" S5      S 5       nU R                  UR                  S5        g )Nr   r&   r(   c                     [        5       eNNotImplementedError)os    r   doFoo'NamedTests.test_function.<locals>.doFoo@   s    %''r!   r/   )r   r'   r;   s      r   test_functionNamedTests.test_function=   s3    5	u	( 
	( 	1159r!   c                     SSK Jn   " S S5      nU" 5       nU" S5      " U5        U R                  UR                  S5        g )Nr   r&   c                       \ rS rSrSrg)%NamedTests.test_instance.<locals>.FooI   r   Nr,   r   r!   r   r-   rA   I       r!   r-   r(   r/   )r   r'   r-   r(   s       r   test_instanceNamedTests.test_instanceF   s;    5	 	eeS""E	
r!   r   N)r   r   r   r   r3   r=   rD   r    r   r!   r   r#   r#   0   s    	
:

r!   r#   c                   P    \ 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)EmptyDeclarationTestsS   c                     SSK Jn  U" 5       $ Nr   )Declarationr0   rK   r   rK   s     r   	_getEmptyEmptyDeclarationTests._getEmptyW   s    ;}r!   c                 Z    U R                  5       nU R                  [        U5      / 5        g r7   )rN   r1   listr   decls     r   test___iter___empty)EmptyDeclarationTests.test___iter___empty[   s"    ~~dR(r!   c                     SSK Jn  U R                  5       nU R                  [	        UR                  5       5      U/5        g Nr   	Interface)zope.interface.interfacerY   rN   r1   rQ   	flattenedr   rY   rS   s      r   test_flattened_empty*EmptyDeclarationTests.test_flattened_empty_   s/    6~~dnn./)=r!   c                 R    SSK Jn  U R                  5       nU R                  X5        g rW   )rZ   rY   rN   assertNotInr\   s      r   test___contains___empty-EmptyDeclarationTests.test___contains___emptyd   s    6~~)r!   c                     SSK Jn  U R                  5       nU R                  UR	                  U5      5        U R                  UR	                  USS95        g )Nr   rX   Tstrict)rZ   rY   rN   
assertTrueextendsr\   s      r   test_extends_empty(EmptyDeclarationTests.test_extends_emptyi   s?    6~~Y/0Yt<=r!   c                 z    U R                  5       n[        UR                  5       5      nU R                  U/ 5        g r7   )rN   rQ   
interfacesr1   )r   rS   
iface_lists      r   test_interfaces_empty+EmptyDeclarationTests.test_interfaces_emptyo   s/    ~~$//+,
R(r!   c                 j    SSK Jn  U R                  5       nU R                  UR                  X!45        g rW   )rZ   rY   rN   r1   __sro__r\   s      r   test___sro___#EmptyDeclarationTests.test___sro___t   s(    6~~'9:r!   c                 j    SSK Jn  U R                  5       nU R                  UR                  U45        g rW   )rZ   rY   rN   r1   __iro__r\   s      r   test___iro___#EmptyDeclarationTests.test___iro___y   s'    6~~	|4r!   c                     U R                  5       nU R                  UR                  S5      5        U R                  UR                  SS5      S5        U R	                  UR
                  5        g )Nattrabcdef)rN   assertIsNonegetr1   assertFalse_v_attrsrR   s     r   test_getEmptyDeclarationTests.test_get~   sT    ~~$((6*+%/7 	'r!   c                     U R                  5       n[        5       Ul        UR                  U5        U R	                  UR                  5        g r7   )rN   objectr~   changedr}   rR   s     r    test_changed_w_existing__v_attrs6EmptyDeclarationTests.test_changed_w_existing__v_attrs   s5    ~~T'r!   r   N)r   r   r   r   rN   rT   r]   ra   rh   rm   rq   ru   r   r   r    r   r!   r   rG   rG   S   s4    )>
*
>)
;
5
((r!   rG   c                       \ 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)DeclarationTests   c                     SSK Jn  U$ rJ   rL   rM   s     r   _getTargetClass DeclarationTests._getTargetClass       ;r!   c                 .    U R                  5       " U0 UD6$ r7   r   r   argskws      r   _makeOneDeclarationTests._makeOne       ##%t2r22r!   c                 n    U R                  5       nU R                  [        UR                  5      / 5        g r7   )r   r1   rQ   	__bases__rR   s     r   test_ctor_no_bases#DeclarationTests.test_ctor_no_bases   s&    }}dnn-r2r!   c                     SSK Jn  U" S5      nU R                  U5      nU R                  [	        UR
                  5      U/5        g Nr   InterfaceClassIFoo)rZ   r   r   r1   rQ   r   r   r   r   rS   s       r   test_ctor_w_interface_in_bases/DeclarationTests.test_ctor_w_interface_in_bases   s8    ;f%}}T"dnn-v6r!   c                     SSK Jn  U" 5       nU R                  U5      nU R                  [	        UR
                  5      U/5        g Nr   
Implements)r0   r   r   r1   rQ   r   )r   r   implrS   s       r   test_ctor_w_implements_in_bases0DeclarationTests.test_ctor_w_implements_in_bases   s5    :|}}T"dnn-v6r!   c                 |    U R                  5       nUR                  U5        U R                  UR                  5        g r7   )r   r   r{   r~   rR   s     r   !test_changed_wo_existing__v_attrs2DeclarationTests.test_changed_wo_existing__v_attrs   s+    }}T$--(r!   c                 F    U R                  5       nU R                  X5        g r7   )r   r`   rR   s     r   test___contains__w_self(DeclarationTests.test___contains__w_self   s    }}$r!   c                 b    SSK Jn  U" S5      nU R                  5       nU R                  X#5        g r   )rZ   r   r   r`   r   s       r   "test___contains__w_unrelated_iface3DeclarationTests.test___contains__w_unrelated_iface   s(    ;f%}}$r!   c                 d    SSK Jn  U" S5      nU R                  U5      nU R                  X#5        g r   )rZ   r   r   assertInr   s       r   !test___contains__w_base_interface2DeclarationTests.test___contains__w_base_interface   s)    ;f%}}T"d!r!   c                 z    SSK Jn  U" S5      nU R                  U5      nU R                  [	        U5      U/5        g r   rZ   r   r   r1   rQ   r   s       r   test___iter___single_base*DeclarationTests.test___iter___single_base   s3    ;f%}}T"ddV,r!   c                     SSK Jn  U" S5      nU" S5      nU R                  X#5      nU R                  [	        U5      X#/5        g Nr   r   r   IBarr   r   r   r   r   rS   s        r   test___iter___multiple_bases-DeclarationTests.test___iter___multiple_bases   s=    ;f%f%}}T(dd\2r!   c                     SSK Jn  U" S5      nU" SU45      nU R                  U5      nU R                  [	        U5      U/5        g r   r   r   s        r   test___iter___inheritance*DeclarationTests.test___iter___inheritance   sA    ;f%ftg.}}T"ddV,r!   c                     SSK Jn  U" S5      nU" S5      nU R                  X2U45      nU R                  [	        U5      X2/5        g r   r   r   s        r   'test___iter___w_nested_sequence_overlap8DeclarationTests.test___iter___w_nested_sequence_overlap   sA    ;f%f%}}T$<0dd\2r!   c                     SSK Jn  SSK Jn  U" S5      nU R                  U5      nU R	                  [        UR                  5       5      X1/5        g )Nr   rX   r   r   rZ   rY   r   r   r1   rQ   r[   )r   rY   r   r   rS   s        r   test_flattened_single_base+DeclarationTests.test_flattened_single_base   s?    6;f%}}T"dnn./$1BCr!   c                     SSK Jn  SSK Jn  U" S5      nU" S5      nU R                  X45      nU R	                  [        UR                  5       5      X4U/5        g Nr   rX   r   r   r   r   r   rY   r   r   r   rS   s         r   test_flattened_multiple_bases.DeclarationTests.test_flattened_multiple_bases   sK    6;f%f%}}T(dnn./$i1HIr!   c                     SSK Jn  SSK Jn  U" S5      nU" SU45      nU R                  U5      nU R	                  [        UR                  5       5      XCU/5        g r   r   r   s         r   test_flattened_inheritance+DeclarationTests.test_flattened_inheritance   sO    6;f%ftg.}}T"dnn./$i1HIr!   c                     SSK Jn  SSK Jn  U" S5      nU" S5      nU R                  XCU45      nU R	                  [        UR                  5       5      XCU/5        g r   r   r   s         r   (test_flattened_w_nested_sequence_overlap9DeclarationTests.test_flattened_w_nested_sequence_overlap   sQ    6;f%f%
 }}T$<0dnn./$i1HIr!   c                     SSK Jn  U" S5      nU" S5      nU R                  U5      nXC-
  nU R                  XPR	                  5       5        U R                  [        U5      U/5        g r   rZ   r   r   assertIsInstancer   r1   rQ   r   r   r   r   beforeafters         r    test___sub___unrelated_interface1DeclarationTests.test___sub___unrelated_interface   s[    ;f%f%t$e%9%9%;<etf-r!   c                     SSK Jn  U" S5      nU R                  U5      nX2-
  nU R                  [	        U5      / 5        g r   r   )r   r   r   r   r   s        r   test___sub___related_interface/DeclarationTests.test___sub___related_interface  s8    ;f%t$eb)r!   c                     SSK Jn  U" S5      nU" SU45      nU R                  U5      nXC-
  nU R                  [	        U5      / 5        g r   r   r   s         r   -test___sub___related_interface_by_inheritance>DeclarationTests.test___sub___related_interface_by_inheritance
  sF    ;f%ftg.t$eb)r!   c                     SSK Jn  U" S5      nU" S5      nU R                  U5      nXC-   nU R                  XPR	                  5       5        U R                  [        U5      X#/5        g r   r   r   s         r    test___add___unrelated_interface1DeclarationTests.test___add___unrelated_interface  s[    ;f%f%t$e%9%9%;<etl3r!   c                     SSK Jn  U" S5      nU" S5      nU" S5      nU R                  X#5      nU R                  X45      nXV-   nU R                  [	        U5      X#U/5        g )Nr   r   r   r   IBazr   )r   r   r   r   r   r   otherr   s           r   test___add___related_interface/DeclarationTests.test___add___related_interface  s_    ;f%f%f%t*d)et4&89r!   c                    SSK Jn  SSK Jn  SSKJn  SSKJn  U" S5      nU" SU45      nU" UR                  R                  S5         U R                  U5      nXv-   nS S S 5        U R                  WR                  XeU45        U R                  UR                  Xe45        U R                  [        U5      Xe/5        g ! , (       d  f       Nf= f)	Nr   rX   ror   	C3SettingIBaseIDerivedT)zope.interfacerY   r   rZ   r   zope.interface.tests.test_ror   C3
STRICT_IROr   r1   rt   r   rQ   )	r   rY   r   r   r   r   r   baser   s	            r   "test___add___overlapping_interface3DeclarationTests.test___add___overlapping_interface%  s     	-%;:w'!*uh7ruu''.=='DOE / 	)(DE8*;<ex&78 /.s   B>>
C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 " S	 S
U5      nU" U5       " S S5      5       nU" UR                  R                  S5         U" U5      U-   n	S S S 5        U R                  W	R                  XXa45        U R                  U	R                  Xv45        U R                  [        U	5      Xv/5        g ! , (       d  f       Nf= f)Nr   rX   implementedByimplementerr   r   c                       \ rS rSrSrg)PDeclarationTests.test___add___overlapping_interface_implementedBy.<locals>.IBaseiF  r   Nr,   r   r!   r   r   r   F  rC   r!   r   c                       \ rS rSrSrg)SDeclarationTests.test___add___overlapping_interface_implementedBy.<locals>.IDerivediI  r   Nr,   r   r!   r   r   r   I  rC   r!   r   c                       \ rS rSrSrg)ODeclarationTests.test___add___overlapping_interface_implementedBy.<locals>.BaseiL  r   Nr,   r   r!   r   Baser  L  r.   r!   r  T)r   rY   r   r   r   r   r   r   r   r1   rp   r   rQ   )
r   rY   r   r   r   r   r   r   r  r   s
             r   0test___add___overlapping_interface_implementedByADeclarationTests.test___add___overlapping_interface_implementedBy;  s    
 	-0.%:	I 		u 	 
U		 	 
	 ruu''.!$'(2E / 	%(KL8*;<ex&78 /.s   'C
C!r   N)r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r    r   r!   r   r   r      s~    3377)
%%"-3-3DJJJ.**4:9,9r!   r   c                   V    \ 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)TestImmutableDeclarationiX  c                     SSK Jn  U$ )Nr   )_ImmutableDeclaration)r0   r	  )r   r	  s     r   r   (TestImmutableDeclaration._getTargetClassZ  s    E$$r!   c                     SSK Jn  U$ )Nr   )_empty)r0   r  )r   r  s     r   rN   "TestImmutableDeclaration._getEmpty^  s
    6r!   c                     SS K nUR                  UR                  U R                  5       5      5      nU R	                  X R                  5       5        g )Nr   )pickleloadsdumpsrN   assertIs)r   r  copieds      r   test_pickle$TestImmutableDeclaration.test_pickleb  s6    fll4>>+;<=fnn./r!   c                 j    U R                  U R                  5       " 5       U R                  5       5        g r7   )r  r   rN   r   s    r   test_singleton'TestImmutableDeclaration.test_singletong  s'      "$NN	
r!   c                 X    U R                  U R                  5       R                  S5        g )Nr   )r1   rN   r   r  s    r   test__bases__&TestImmutableDeclaration.test__bases__m  s    )33R8r!   c                     U R                  5       nSUl        U R                  U R                  5       R                  S5        U R                  [        5         SUl        S S S 5        g ! , (       d  f       g = f)Nr   )   )rN   r   r1   assertRaisesr   )r   emptys     r   test_change__bases__-TestImmutableDeclaration.test_change__bases__p  sS     )33R8y)"EO *))s   A((
A6c                     U R                  5       nUR                  nU R                  0 U5        SUS'   U R                  0 UR                  5        g )N   r  )rN   
dependentsr1   )r   r   depss      r   test_dependents(TestImmutableDeclaration.test_dependentsx  sH     T"QU--.r!   c                 B    U R                  5       R                  S 5        g r7   )rN   r   r  s    r   test_changed%TestImmutableDeclaration.test_changed  s      &r!   c                    U R                  U R                  5       R                  U 5      5        U R                  U R                  5       R                  U SS95        U R                  U R                  5       R                  U SS95        g )NTrd   F)r}   rN   rg   r  s    r   test_extends_always_false2TestImmutableDeclaration.test_extends_always_false  sl    )11$78)11$t1DE)11$u1EFr!   c                     U R                  U R                  5       R                  S5      5        U R                  U R                  5       R                  SS5      S5        g )Nname*   )r{   rN   r|   r1   r  s    r   test_get_always_default0TestImmutableDeclaration.test_get_always_default  sF    $..*..v67)--fb92>r!   c                    U R                  5       nU R                  UR                  0 5        SUR                  S'   U R                  UR                  0 5        U R                  UR	                  S5      5        0 =o!l        SUS'   U R                  UR                  0 5        U R                  UR	                  S5      5        g )Nr1  rx   )rN   r1   r~   r{   r|   )r   rS   attrss      r   test_v_attrs%TestImmutableDeclaration.test_v_attrs  s    ~~+ "f+$((6*+ ""f+$((6*+r!   r   N)r   r   r   r   r   rN   r  r  r  r!  r'  r*  r-  r2  r6  r    r   r!   r   r  r  X  s:    %0

9#/'G
?,r!   r  c                   P    \ 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)TestImplementsi  c                     SSK Jn  U$ r   )r0   r   )r   r   s     r   r   TestImplements._getTargetClass      :r!   c                 .    U R                  5       " U0 UD6$ r7   r   r   s      r   r   TestImplements._makeOne  r   r!   c                 2    SSK Jn   " S S5      nU" U5      $ )Nr   r   c                       \ rS rSrSrg)+TestImplements._makeOneToCompare.<locals>.Ai  r   Nr,   r   r!   r   ArA    rC   r!   rB  r0   r   )r   r   rB  s      r   _makeOneToCompare TestImplements._makeOneToCompare  s    =	 	 Qr!   c                    U R                  5       nU R                  UR                  S 5        U R                  UR                  S5        U R                  UR                  S5        U R                  [        UR                  5      / 5        g )Nr   ?)r   r1   inheritdeclaredr   rQ   r   r   r   s     r   r   !TestImplements.test_ctor_no_bases  sb    }}t,+,dnn-r2r!   c                 h    U R                  5       nSUl        U R                  [        U5      S5        g )NTestingzclassImplements(Testing))r   r   r1   reprrJ  s     r   test___repr__TestImplements.test___repr__  s)    }}!d%?@r!   c                 t    SSK Jn  U R                  5       nU R                  UR	                  5       US45        g )Nr   r   r7   )r0   r   r   r1   
__reduce__)r   r   r   s      r   test___reduce__TestImplements.test___reduce__  s,    =}}*]G,DEr!   c                 X   SSK Jn  SSKJn   " S S5      n " S S5      nU" S5      nU R	                  U" U5      U" U5      5        U R	                  [        U" U5      5      [        U" U5      5      5        U R                  U" U5      S 5        U R                  S U" U5      5        U R                  U" U5      U" U5      5        U R                  U" U5      U5        U R                  U" U5      U" U5      5        U R                  U" U5      U5        U R                  U" U5      U5        g )	Nr   r   r   c                       \ rS rSrSrg)#TestImplements.test_sort.<locals>.Ai  r   Nr,   r   r!   r   rB  rW    rC   r!   rB  c                       \ rS rSrSrg)#TestImplements.test_sort.<locals>.Bi  r   Nr,   r   r!   r   BrY    rC   r!   rZ  r   )r0   r   rZ   r   r1   hash
assertLessassertGreaterassertLessEqualassertGreaterEqualassertNotEqual)r   r   r   rB  rZ  r   s         r   	test_sortTestImplements.test_sort  s   =;	 		 	 f%q)=+;<mA./mA6F1GHa($/!	
 	a(-*:;=+T2]1-}Q/?@a 0$7M!,d3r!   c                    SSK Jn   " S S5      n " S S5      n " S S5      nU" U5      nU" U5      nU" U5      nU R                  UU5        U R                  XV5        U R                  Xe5        U R                  Xu5        U R                  XW5        U R                  Xu5        U R                  XW5        U R                  Xv5        U R                  Xg5        g )	Nr   r   c                   ,    \ rS rSrS rS rS rS rSrg)1TestImplements.test_proxy_equality.<locals>.Proxyi  c                     Xl         g r7   _wrapped)r   wrappeds     r   __init__:TestImplements.test_proxy_equality.<locals>.Proxy.__init__  s     'r!   c                     [        5       er7   r8   r   r0  s     r   __getattr__=TestImplements.test_proxy_equality.<locals>.Proxy.__getattr__      )++r!   c                      U R                   U:H  $ r7   rg  r   r   s     r   __eq__8TestImplements.test_proxy_equality.<locals>.Proxy.__eq__      }}--r!   c                      U R                   U:g  $ r7   rg  rr  s     r   __ne__8TestImplements.test_proxy_equality.<locals>.Proxy.__ne__  ru  r!   rg  N)	r   r   r   r   rj  rn  rs  rw  r    r   r!   r   Proxyre    s    (,..r!   ry  c                       \ rS rSrSrg)-TestImplements.test_proxy_equality.<locals>.Ai  r   Nr,   r   r!   r   rB  r{    rC   r!   rB  c                       \ rS rSrSrg)-TestImplements.test_proxy_equality.<locals>.Bi  r   Nr,   r   r!   r   rZ  r}    rC   r!   rZ  )r0   r   r1   r`  )r   r   ry  rB  rZ  implementedByAimplementedByBproxys           r   test_proxy_equality"TestImplements.test_proxy_equality  s    =	. 	.	 		 	 'q)&q)n% 		
 	N;N;////E2N2r!   c                 h   U R                  5       nU R                  UR                  5        U R                  SUR                  5        SUl        U R                  SUR                  5        UR                  S 5        U R                  UR                  5        U R                  SUR                  5        g )N_super_cacher1  )r   r{   r  r`   __dict__r   r   rJ  s     r    test_changed_deletes_super_cache/TestImplements.test_changed_deletes_super_cache  s    }}$++,7ndmm4T$++,7r!   c                 "   U R                  5       nU R                  UR                  5        U R                  SUR                  5        UR                  S 5        U R                  UR                  5        U R                  SUR                  5        g )Nr  )r   r{   r  r`   r  r   rJ  s     r   %test_changed_does_not_add_super_cache4TestImplements.test_changed_does_not_add_super_cache  si    }}$++,7T$++,7r!   r   N)r   r   r   r   r   r   rD  r   rO  rS  ra  r  r  r  r    r   r!   r   r9  r9    s7    3 3A
F
42*3X
88r!   r9  c                      ^  \ rS rSrS r\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U 4S jrU 4S jrU 4S jrU 4S jrU 4S jrU 4S jrSrU =r$ )Test_implementedByFallbacki  c                     SSK Jn  U$ )Nr   )implementedByFallback)r0   r  )r   r  s     r   r   *Test_implementedByFallback._getTargetClass  s    E$$r!   c                 .    U R                  5       " U0 UD6$ r7   r   r   s      r   _callFUT#Test_implementedByFallback._callFUT"  r   r!   c                      " S S5      nU" 5       nS Ul         U R                  [        U R                  U5      5      / 5        g )Nc                       \ rS rSrSrSrg)]Test_implementedByFallback.test_dictless_wo_existing_Implements_wo_registrations.<locals>.Fooi&  __implemented__r   Nr   r   r   r   	__slots__r    r   r!   r   r-   r  &      ,Ir!   r-   )r  r1   rQ   r  r   r-   r(   s      r   5test_dictless_wo_existing_Implements_wo_registrationsPTest_implementedByFallback.test_dictless_wo_existing_Implements_wo_registrations%  s9    	- 	-e"dmmC0126r!   c                 h     " S S5      nU" 5       nU R                  [        U R                  U5        g )Nc                   8    \ rS rSrS rS r\" \\5      rS rSr	g)hTest_implementedByFallback.test_dictless_wo_existing_Implements_cant_assign___implemented__.<locals>.Fooi.  c                     [        5       er7   r8   r  s    r   	_get_implrTest_implementedByFallback.test_dictless_wo_existing_Implements_cant_assign___implemented__.<locals>.Foo._get_impl/  rp  r!   c                     [         er7   )r   )r   vals     r   	_set_implrTest_implementedByFallback.test_dictless_wo_existing_Implements_cant_assign___implemented__.<locals>.Foo._set_impl2  s    r!   c                     [        5       er7   r8   r  s    r   __call__qTest_implementedByFallback.test_dictless_wo_existing_Implements_cant_assign___implemented__.<locals>.Foo.__call__7  s    )++r!   r   N)
r   r   r   r   r  r  propertyr  r  r    r   r!   r   r-   r  .  s    ,  'y)<O,r!   r-   r  r   r  r  s      r   @test_dictless_wo_existing_Implements_cant_assign___implemented__[Test_implementedByFallback.test_dictless_wo_existing_Implements_cant_assign___implemented__,  s+    	, 	, e)T]]C8r!   c                     SSK Jn   " S S5      nU" 5       nS Ul        [        5       n[	        US5       nXEU'   U R                  U R                  U5      U5        S S S 5        g ! , (       d  f       g = f)Nr   declarationsc                       \ rS rSrSrSrg)\Test_implementedByFallback.test_dictless_wo_existing_Implements_w_registrations.<locals>.FooiA  r  r   Nr  r   r!   r   r-   r  A  r  r!   r-   #BuiltinImplementationSpecifications)r   r  r  r   _MonkeyDictr  r  )r   r  r-   r(   regspecss         r   4test_dictless_wo_existing_Implements_w_registrationsOTest_implementedByFallback.test_dictless_wo_existing_Implements_w_registrations>  si    /	- 	- e"h>@CH#JMM$--,c2@ @ @s   &A$$
A2c                     SSK Jn  U" 5       n " S S5      nU" 5       nX$l        U R                  U R	                  U5      U5        g )Nr   r   c                       \ rS rSrSrSrg)KTest_implementedByFallback.test_dictless_w_existing_Implements.<locals>.FooiP  r  r   Nr  r   r!   r   r-   r  P  r  r!   r-   )r0   r   r  r  r  )r   r   r   r-   r(   s        r   #test_dictless_w_existing_Implements>Test_implementedByFallback.test_dictless_w_existing_ImplementsL  s<    :|	- 	- e"dmmC($/r!   c                     SSK Jn   " S S5      nU" 5       nU" S5      nU4Ul        U R                  [	        U R                  U5      5      U/5        g )Nr   r   c                       \ rS rSrSrSrg)OTest_implementedByFallback.test_dictless_w_existing_not_Implements.<locals>.FooiZ  r  r   Nr  r   r!   r   r-   r  Z  r  r!   r-   r   )rZ   r   r  r1   rQ   r  )r   r   r-   r(   r   s        r   'test_dictless_w_existing_not_ImplementsBTest_implementedByFallback.test_dictless_w_existing_not_ImplementsW  sL    ;	- 	- ef%#gdmmC01D6:r!   c                 |   ^ SSK Jn  U" 5       m " U4S jS5      nU R                  U R                  U5      T5        g )Nr   r   c                      > \ rS rSr Y rSrg)JTest_implementedByFallback.test_w_existing_attr_as_Implements.<locals>.Fooif  r   Nr   r   r   r   r  r    r   s   r   r-   r  f      "Or!   r-   r0   r   r  r  r   r   r-   r   s      @r   "test_w_existing_attr_as_Implements=Test_implementedByFallback.test_w_existing_attr_as_Implementsb  0    :|	# 	# 	dmmC($/r!   c                 *   SSK Jn  SSKJn  [	        US5       nU R                  [        U R                  [        5      5      / 5        U R                  [        U R                  [        5      5      / 5        U R                  [        U R                  [        5      5      / 5        [        [        [        4 HB  nX4   nU R                  XR5        U R                  [        U5      SUR                  < S35        MD     S S S 5        g ! , (       d  f       g = f)Nr   r  r   r  classImplements())r   r  r0   r   r  r1   rQ   r  tupledictr   rN  r   )r   r  r   r  typspecs         r   test_builtins_added_to_cache7Test_implementedByFallback.test_builtins_added_to_cachek  s    /:>@CHT$--"67<T$--"56;T$--"56;tT*z%%d7  d$'LL"34 +@ @ @s   C"D
Dc                    SSK Jn  [        5       [        5       [        5       pCn[        US5       nX%[        '   X5[
        '   XE[        '   U R                  U R                  [        5      U5        U R                  U R                  [
        5      U5        U R                  U R                  [        5      U5        S S S 5        g ! , (       d  f       g = f)Nr   r  r  )	r   r  r   r  r  rQ   r  r  r  )r   r  t_specl_specd_specr  s         r   test_builtins_w_existing_cache9Test_implementedByFallback.test_builtins_w_existing_cachez  s    /!'68VX>@CH!%L $K $KMM$--.7MM$---v6MM$---v6@ @ @s   BC
Cc                 l     " S S5      nU R                  [        U R                  U5      5      / 5        g )Nc                       \ rS rSrSrg)ITest_implementedByFallback.test_oldstyle_class_no_assertions.<locals>.Fooi  r   Nr,   r   r!   r   r-   r    rC   r!   r-   r1   rQ   r  r   r-   s     r   !test_oldstyle_class_no_assertions<Test_implementedByFallback.test_oldstyle_class_no_assertions  ,    	 	 	dmmC0126r!   c                 l     " S S5      nU R                  [        U R                  U5      5      / 5        g )Nc                       \ rS rSrSrg):Test_implementedByFallback.test_no_assertions.<locals>.Fooi  r   Nr,   r   r!   r   r-   r    rC   r!   r-   r  r  s     r   test_no_assertions-Test_implementedByFallback.test_no_assertions  r  r!   c                 h     " S S5      nU" 5       nU R                  [        U R                  U5        g )Nc                       \ rS rSrSrSrg)HTest_implementedByFallback.test_w_None_no_bases_not_factory.<locals>.Fooi  Nr   r  r   r!   r   r-   r        "Or!   r-   r  r  s      r    test_w_None_no_bases_not_factory;Test_implementedByFallback.test_w_None_no_bases_not_factory  s+    	# 	# e)T]]C8r!   c                 z   SSK Jn   " S S5      nU" 5       nSUl        U R                  U5      nU R	                  UR                  S5        U R                  UR                  U5        U R                  UR                  U5        U R                  UR                  U5        U R                  SUR                  5        g )Nr   )objectSpecificationDescriptorc                       \ rS rSrSrS rSrg)FTest_implementedByFallback.test_w_None_no_bases_w_factory.<locals>.Fooi  Nc                     [        5       er7   r8   r  s    r   r  OTest_implementedByFallback.test_w_None_no_bases_w_factory.<locals>.Foo.__call__  rp  r!   r   )r   r   r   r   r  r  r    r   r!   r   r-   r    s    "O,r!   r-   r(   z*zope.interface.tests.test_declarations.foo__provides__)r0   r  r   r  r1   r  rH  r  __providedBy__r`   r  )r   r  r-   r(   r  s        r   test_w_None_no_bases_w_factory9Test_implementedByFallback.test_w_None_no_bases_w_factory  s    M	, 	, e}}S!E	GdllC(c))40 =	
 	6r!   c                    SSK Jn   " S S5      nU R                  U5      nU R                  UR                  S5        U R                  UR                  U5        U R                  UR                  U5        U R                  UR                  U5        U R                  UR                  U5        U R                  UR                  UR                  5        g )Nr   ClassProvidesc                       \ rS rSrSrSrg)DTest_implementedByFallback.test_w_None_no_bases_w_class.<locals>.Fooi  Nr   r  r   r!   r   r-   r    r  r!   r-   z*zope.interface.tests.test_declarations.Foo)r0   r  r  r1   r   r  rH  r  r   r  r  )r   r  r-   r  s       r   test_w_None_no_bases_w_class7Test_implementedByFallback.test_w_None_no_bases_w_class  s    =	# 	# }}S!E	GdllC(c))40	
 	m	
 	c00	
r!   c                 |   ^ SSK Jn  U" 5       m " U4S jS5      nU R                  U R                  U5      T5        g )Nr   r   c                      > \ rS rSr Y rSrg)BTest_implementedByFallback.test_w_existing_Implements.<locals>.Fooi  r   Nr  r  s   r   r-   r    r  r!   r-   r  r  s      @r   test_w_existing_Implements5Test_implementedByFallback.test_w_existing_Implements  r  r!   c                 b  > SSK Jn  SSKJ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U R	                  [        U R                  U5      5      XC/5        [        Xf5      nU R	                  [        U R                  U5      5      U/5        g )Nr   rX   r   c                       \ rS rSrSrg)STest_implementedByFallback.test_super_when_base_implements_interface.<locals>.IBasei  r   Nr,   r   r!   r   r   r	    rC   r!   r   c                       \ rS rSrSrg)VTest_implementedByFallback.test_super_when_base_implements_interface.<locals>.IDerivedi  r   Nr,   r   r!   r   r   r    rC   r!   r   c                       \ rS rSrSrg)RTest_implementedByFallback.test_super_when_base_implements_interface.<locals>.Basei  r   Nr,   r   r!   r   r  r    r.   r!   r  c                       \ rS rSrSrg)UTest_implementedByFallback.test_super_when_base_implements_interface.<locals>.Derivedi  r   Nr,   r   r!   r   Derivedr    r.   r!   r  r   rY   r0   r   r1   rQ   r  super	r   rY   r   r   r   r  r  sup	__class__s	           r   )test_super_when_base_implements_interfaceDTest_implementedByFallback.test_super_when_base_implements_interface  s    ,;	I 		u 	 
U		 	 
	 
X		d 	 
	 	dmmG457HIG%dmmC01E7;r!   c                   > SSK Jn  SSKJn   " S SU5      n " S SU5      nU" U5       " S S	5      5       n " S
 SU5      n " S SU5      nU" U5       " S SXg5      5       nU R	                  [        U R                  U5      5      XC/5        [        X5      n	U R	                  [        U R                  U	5      5      U/5        g )Nr   rX   r   c                       \ rS rSrSrg)[Test_implementedByFallback.test_super_when_base_implements_interface_diamond.<locals>.IBasei  r   Nr,   r   r!   r   r   r    rC   r!   r   c                       \ rS rSrSrg)^Test_implementedByFallback.test_super_when_base_implements_interface_diamond.<locals>.IDerivedi  r   Nr,   r   r!   r   r   r    rC   r!   r   c                       \ rS rSrSrg)ZTest_implementedByFallback.test_super_when_base_implements_interface_diamond.<locals>.Basei  r   Nr,   r   r!   r   r  r    r.   r!   r  c                       \ rS rSrSrg)\Test_implementedByFallback.test_super_when_base_implements_interface_diamond.<locals>.Child1i  r   Nr,   r   r!   r   Child1r     rC   r!   r!  c                       \ rS rSrSrg)\Test_implementedByFallback.test_super_when_base_implements_interface_diamond.<locals>.Child2i  r   Nr,   r   r!   r   Child2r#    rC   r!   r$  c                       \ rS rSrSrg)]Test_implementedByFallback.test_super_when_base_implements_interface_diamond.<locals>.Derivedi  r   Nr,   r   r!   r   r  r&    r.   r!   r  r  )r   rY   r   r   r   r  r!  r$  r  r  r  s             r   1test_super_when_base_implements_interface_diamondLTest_implementedByFallback.test_super_when_base_implements_interface_diamond  s    ,;	I 		u 	 
U		 	 
		T 		T 	 
X		f 	 
	 	dmmG457HIG%dmmC01E7;r!   c                   > SSK Jn  SSKJ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Xg5      5       nU R	                  UR
                  XXu[        45        U R	                  [        U R                  U5      5      XC/5        [        X5      n	U R                  U	5      n
U R	                  [        U
5      U/5        U R                  U
R                  5        g )Nr   rX   r   c                       \ rS rSrSrg)]Test_implementedByFallback.test_super_when_parent_implements_interface_diamond.<locals>.IBasei  r   Nr,   r   r!   r   r   r+    rC   r!   r   c                       \ rS rSrSrg)`Test_implementedByFallback.test_super_when_parent_implements_interface_diamond.<locals>.IDerivedi
  r   Nr,   r   r!   r   r   r-  
  rC   r!   r   c                       \ rS rSrSrg)\Test_implementedByFallback.test_super_when_parent_implements_interface_diamond.<locals>.Basei  r   Nr,   r   r!   r   r  r/    rC   r!   r  c                       \ rS rSrSrg)^Test_implementedByFallback.test_super_when_parent_implements_interface_diamond.<locals>.Child1i  r   Nr,   r   r!   r   r!  r1    rC   r!   r!  c                       \ rS rSrSrg)^Test_implementedByFallback.test_super_when_parent_implements_interface_diamond.<locals>.Child2i  r   Nr,   r   r!   r   r$  r3    r.   r!   r$  c                       \ rS rSrSrg)_Test_implementedByFallback.test_super_when_parent_implements_interface_diamond.<locals>.Derivedi  r   Nr,   r   r!   r   r  r5    r.   r!   r  )r   rY   r0   r   r1   __mro__r   rQ   r  r  r{   _dependents)r   rY   r   r   r   r  r!  r$  r  r  futr  s              r   3test_super_when_parent_implements_interface_diamondNTest_implementedByFallback.test_super_when_parent_implements_interface_diamond  s    ,;	I 		u 		 		T 	 
U		T 	 
	 
X		f 	 
	 	OOgvVD	
 	dmmG457HIG%mmC cUG,#//*r!   c                 J  > SSK Jn  SSKJn   " S SU5      n " S SU5      n " S S	5      nU" U5       " S
 SU5      5       nU R	                  [        U R                  U5      5      U/5        [        Xf5      nU R	                  [        U R                  U5      5      / 5        g )Nr   rX   r   c                       \ rS rSrSrg)YTest_implementedByFallback.test_super_when_base_doesnt_implement_interface.<locals>.IBasei(  r   Nr,   r   r!   r   r   r=  (  rC   r!   r   c                       \ rS rSrSrg)\Test_implementedByFallback.test_super_when_base_doesnt_implement_interface.<locals>.IDerivedi+  r   Nr,   r   r!   r   r   r?  +  rC   r!   r   c                       \ rS rSrSrg)XTest_implementedByFallback.test_super_when_base_doesnt_implement_interface.<locals>.Basei.  r   Nr,   r   r!   r   r  rA  .  rC   r!   r  c                       \ rS rSrSrg)[Test_implementedByFallback.test_super_when_base_doesnt_implement_interface.<locals>.Derivedi1  r   Nr,   r   r!   r   r  rC  1  r.   r!   r  r  r  s	           r   /test_super_when_base_doesnt_implement_interfaceJTest_implementedByFallback.test_super_when_base_doesnt_implement_interface$  s    ,;	I 		u 		 	 
X		d 	 
	 	dmmG45zBG%dmmC0126r!   c                 4  > SSK Jn  SSKJn   " S SU5      n " S SU5      nU" U5       " S S	5      5       nU R	                  [        U R                  U5      5      U/5        [        XU5      nU R	                  [        U R                  U5      5      / 5        g )
Nr   rX   r   c                       \ rS rSrSrg)HTest_implementedByFallback.test_super_when_base_is_object.<locals>.IBasei>  r   Nr,   r   r!   r   r   rH  >  rC   r!   r   c                       \ rS rSrSrg)KTest_implementedByFallback.test_super_when_base_is_object.<locals>.IDerivediA  r   Nr,   r   r!   r   r   rJ  A  rC   r!   r   c                       \ rS rSrSrg)JTest_implementedByFallback.test_super_when_base_is_object.<locals>.DerivediD  r   Nr,   r   r!   r   r  rL  D  r.   r!   r  r  )r   rY   r   r   r   r  r  r  s          r   test_super_when_base_is_object9Test_implementedByFallback.test_super_when_base_is_object:  s    ,;	I 		u 	 
X		 	 
	 	dmmG45zBG%dmmC0126r!   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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	U" U5       " S SU5      5       n
U" Xg5       " S SX5      5       nUn[	        X5      n[	        X5      n[	        X5      nU R                  [        U R                  U5      5      XgXCU/5        U R                  [        U R                  U5      5      XCU/5        U R                  [        U R                  U5      5      XS/5        U R                  [        U R                  U5      5      U/5        g )Nr   rX   r   c                       \ rS rSrSrg)RTest_implementedByFallback.test_super_multi_level_multi_inheritance.<locals>.IBaseiQ  r   Nr,   r   r!   r   r   rQ  Q  rC   r!   r   c                       \ rS rSrSrg)PTest_implementedByFallback.test_super_multi_level_multi_inheritance.<locals>.IM1iT  r   Nr,   r   r!   r   IM1rS  T  rC   r!   rT  c                       \ rS rSrSrg)PTest_implementedByFallback.test_super_multi_level_multi_inheritance.<locals>.IM2iW  r   Nr,   r   r!   r   IM2rV  W  rC   r!   rW  c                       \ rS rSrSrg)UTest_implementedByFallback.test_super_multi_level_multi_inheritance.<locals>.IDerivediZ  r   Nr,   r   r!   r   r   rY  Z  rC   r!   r   c                       \ rS rSrSrg)WTest_implementedByFallback.test_super_multi_level_multi_inheritance.<locals>.IUnrelatedi]  r   Nr,   r   r!   r   
IUnrelatedr[  ]  rC   r!   r\  c                       \ rS rSrSrg)QTest_implementedByFallback.test_super_multi_level_multi_inheritance.<locals>.Basei`  r   Nr,   r   r!   r   r  r^  `  r.   r!   r  c                       \ rS rSrSrg)OTest_implementedByFallback.test_super_multi_level_multi_inheritance.<locals>.M1id  r   Nr,   r   r!   r   M1r`  d  r.   r!   ra  c                       \ rS rSrSrg)OTest_implementedByFallback.test_super_multi_level_multi_inheritance.<locals>.M2ih  r   Nr,   r   r!   r   M2rc  h  r.   r!   rd  c                       \ rS rSrSrg)TTest_implementedByFallback.test_super_multi_level_multi_inheritance.<locals>.Derivedil  r   Nr,   r   r!   r   r  rf  l  r.   r!   r  r   rY   r0   r   r  r1   rQ   r  r   rY   r   r   rT  rW  r   r\  r  ra  rd  r  dsdsm1sm2r  s                   r   (test_super_multi_level_multi_inheritanceCTest_implementedByFallback.test_super_multi_level_multi_inheritanceM  s}   ,;	I 		) 		) 		u 		 	 
U		 	 
	 
S		 	 
	 
S		 	 
	 
X	*	b 	 
+	 7$B B dmmA./"C@	BdmmB/0c*	,dmmC01	'dmmC01	"r!   r   )r   r   r   r   r   _getFallbackClassr  r  r  r  r  r  r  r  r  r  r  r  r  r   r  r  r'  r9  rD  rM  rm  r    __classcell__r  s   @r   r  r    s    %
 (379$3	0	;04
77797*
*0<,<8+B7,7&/" /"r!   r  c                       \ rS rSrS rSrg)Test_implementedByi  c                     SSK Jn  U$ )Nr   r   rC  )r   r   s     r   r   "Test_implementedBy._getTargetClass      =r!   r   Nr   r   r   r   r   r    r   r!   r   rs  rs    s    r!   rs  c                   :    \ rS rSrSrS rS\ S-   S4S jrS rS	rg)
_ImplementsTestMixini  Tc                     [         er7   r8   )r   clsifaces      r   r  _ImplementsTestMixin._callFUT  s    !!r!   Nz.Foo	not givenc                 N   SSK Jn  SSKJn  U" S5      nU R	                  X5      nU R                  X5        UR                  n	Ub  U R                  X5        U R                  U	R                  U5        US:X  a  UOUnU R                  U	R                  U5        U R                  UR                  U	5        U R                  (       a^  U R                  UR                  U5        U R                  UR                  U5        U R                  UR                  UR                  5        X4$ )Nr   r  r   r   r~  )r0   r  rZ   r   r  r  r  r1   r   rH  FUT_SETS_PROVIDED_BYr   r  r  )
r   r-   	orig_spec	spec_namerH  r  r   r   returnedr  s
             r   _check_implementer'_ImplementsTestMixin._check_implementer  s     	>;f%==+h$"" MM$*"	$ K/#WdllG,c))40$$!!#"4"4mD!!#"2"2MBS--s/A/AByr!   c                 :     " S S5      nU R                  U5        g )Nc                       \ rS rSrSrg),_ImplementsTestMixin.test_class.<locals>.Fooi  r   Nr,   r   r!   r   r-   r    rC   r!   r-   )r  r  s     r   r3   _ImplementsTestMixin.test_class  s    	 	 	$r!   r   )	r   r   r   r   r  r  r  r3   r    r   r!   r   ry  ry    s'    "
 &*%-%6#.6%r!   ry  c                   0    \ rS rSrSrS rS rS rS rSr	g)	Test_classImplementsOnlyi  Fc                 "    SSK Jn  U" X5        U$ )Nr   )classImplementsOnly)r0   r  )r   r{  r|  r  s       r   r  !Test_classImplementsOnly._callFUT  s    CC'
r!   c                 R  ^ SSK Jn  SSKJn  U" S5      nU" S5      nU" U5      mU4Tl         " U4S jS5      nUTl        U R                  XT5        U R                  UR                  T5        U R                  TR
                  S 5        U R                  TR                  U45        g )Nr   r   r   r   r   c                      > \ rS rSr Y rSrg)@Test_classImplementsOnly.test_w_existing_Implements.<locals>.Fooi  r   Nr  r  s   r   r-   r    r  r!   r-   )
r0   r   rZ   r   rI  rH  r  r  r  r1   r   r   r   r   r   r-   r   s         @r   r  3Test_classImplementsOnly.test_w_existing_Implements  s    :;f%f%$	# 	# c c))40t,0r!   c                 |   ^ SSK Jn  SSKJn  U" S5      nU" U5      m " U4S jS5      nU R	                  UTSS S9  g )	Nr   r   r   r   c                      > \ rS rSr Y rSrg)0Test_classImplementsOnly.test_class.<locals>.Fooi  r   Nr  )old_specs   r   r-   r    s    &Or!   r-   rG  rH  )r0   r   rZ   r   r  )r   r   r   r   r-   r  s        @r   r3   #Test_classImplementsOnly.test_class  s@    :;f%d#	' 	' 	XsDAr!   c                     U R                  [        S[        40 5      S S9u  p " S SU5      nU R                  X25        U R	                  UR                  U5      5        g )Nr-   r  c                       \ rS rSrSrg)RTest_classImplementsOnly.test_redundant_with_super_still_implements.<locals>.Childi  r   Nr,   r   r!   r   Childr    rC   r!   r  )r  typer   r  rf   r   )r   r  r   r  s       r   *test_redundant_with_super_still_implementsCTest_classImplementsOnly.test_redundant_with_super_still_implements  s[    --	2& . 

	D 	 	e#++E23r!   r   N)
r   r   r   r   r  r  r  r3   r  r    r   r!   r   r  r    s     
1$	B
4r!   r  c                   >    \ rS rSrS rS rS rS rS rS r	S r
S	rg
)Test_classImplementsi  c                 D    SSK Jn  U" X5      nU R                  U5        U$ )Nr   classImplements)r0   r  r{   )r   r{  r|  r  results        r   r  Test_classImplements._callFUT  s'    ? 
 	&!
r!   c                    U R                  U5      u  p " S SU5      nU R                  X25      nU R                  SUR                  5        U R	                  SUR                  5        U R                  SUR                  5        UR
                  nU R                  UR                  S5        U R                  UR                  U5        U R                  UR                  U" 5       5      5        g )Nc                       \ rS rSrSrg)ATest_classImplements.__check_implementer_redundant.<locals>.Childi  r   Nr,   r   r!   r   r  r    rC   r!   r  r  r  r  r   )r  r  r   r  r`   r  r1   rI  rH  rf   
providedBy)r   r  r   r  r  r  s         r   __check_implementer_redundant2Test_classImplements.__check_implementer_redundant  s     --d3	D 	 ==.'):):;)8+<+<=nh&7&78$$+u-((12r!   c                 :     " S S5      nU R                  U5        g )Nc                       \ rS rSrSrg)UTest_classImplements.test_redundant_implementer_empty_class_declarations.<locals>.Fooi  r   Nr,   r   r!   r   r-   r    rC   r!   r-   )2_Test_classImplements__check_implementer_redundantr  s     r   3test_redundant_implementer_empty_class_declarationsHTest_classImplements.test_redundant_implementer_empty_class_declarations  s    	 	 	**3/r!   c                    SSK Jn  SSK Jn  SSK Jn  SSKJn   " S S5      nU" UR                  R                  S5         U R                  XQ5        U R                  [        U" U5      5      U/5         " S	 S
U5      nU R                  Xa5        U R                  [        U" U5      5      U/5        S S S 5        g ! , (       d  f       g = f)Nr   rX   r   r   r   c                       \ rS rSrSrg)FTest_classImplements.test_redundant_implementer_Interface.<locals>.Fooi  r   Nr,   r   r!   r   r-   r    rC   r!   r-   Fc                       \ rS rSrSrg)FTest_classImplements.test_redundant_implementer_Interface.<locals>.Bazi  r   Nr,   r   r!   r   Bazr        r!   r  )r   rY   r   r   r   r   r   r   r  r1   rQ   )r   rY   r   r   r   r-   r  s          r   $test_redundant_implementer_Interface9Test_classImplements.test_redundant_implementer_Interface  s    ,0%:	 	 ruu''/MM#)T-"45	{Cc  MM#)T-"45	{C 0//s    A2B;;
C	c                     X4$ r7   r   r   applied_firstapplied_seconds      r   _order_for_two#Test_classImplements._order_for_two  s    ..r!   c                 n  ^ SSK Jn  SSKJn  U" S5      nU" S5      nU" U5      mU4Tl         " U4S jS5      nUTl        U R                  XT5        U R                  UR                  T5        U R                  TR
                  U5        U R                  TR                  U R                  X45      5        g )Nr   r   r   r   r   c                      > \ rS rSr Y rSrg)<Test_classImplements.test_w_existing_Implements.<locals>.Fooi&  r   Nr  r  s   r   r-   r  &  r  r!   r-   )r0   r   rZ   r   rI  rH  r  r  r  r1   r  r  s         @r   r  /Test_classImplements.test_w_existing_Implements  s    :;f%f%$	# 	# c c))40s+,,T8	:r!   c                 `  ^	^
 SSK Jn  SSKJn  U" S5      nU" S5      nU" SU45      nUR	                  SU5      m
U4T
l         " U
4S jS	5      n " U
4S
 jS5      nUR	                  SU5      m	U4T	l         " U	4S jSXg5      nUT	l        U R                  X5        U R                  UR                  T	5        U R                  T	R                  U5        U R                  T	R
                  U R                  XT5      5        U R                  T	R                  U R                  XT5      T
4-   5        g )Nr   r   r   IRootISecondRootIExtendsRootRootc                      > \ rS rSr Y rSrg)FTest_classImplements.test_w_existing_Implements_w_bases.<locals>.Root1i;  r   Nr  	impl_roots   r   Root1r  ;      'Or!   r  c                      > \ rS rSr Y rSrg)FTest_classImplements.test_w_existing_Implements_w_bases.<locals>.Root2i>  r   Nr  r  s   r   Root2r  >  r  r!   r  ExtendsRoot1c                      > \ rS rSr Y rSrg)LTest_classImplements.test_w_existing_Implements_w_bases.<locals>.ExtendsRootiD  r   Nr  )impl_extends_roots   r   ExtendsRootr  D  s    /Or!   r  )r0   r   rZ   r   r'   rI  rH  r  r  r  r1   r  r   )r   r   r   r  r  r  r  r  r  r  r  s            @@r   "test_w_existing_Implements_w_bases7Test_classImplements.test_w_existing_Implements_w_bases1  s   :;w'$]3%nuh?$$VU3	#X		( 	(	( 	( ',,^\J&2_"	0% 	0 %0!k/k113DE*22K@*33,,\H	J'':i\I	
r!   r   N)r   r   r   r   r  r  r  r  r  r  r  r    r   r!   r   r  r    s&    3&0D&/:&!
r!   r  c                        \ rS rSrS rS rSrg)Test_classImplementsFirstiU  c                 D    SSK Jn  U" X5      nU R                  U5        U$ )Nr   )classImplementsFirst)r0   r  r{   )r   r{  r|  r  r  s        r   r  "Test_classImplementsFirst._callFUTW  s'    D%
 	&!
r!   c                     X!4$ r7   r   r  s      r   r  (Test_classImplementsFirst._order_for_two_  s    ..r!   r   N)r   r   r   r   r  r  r    r   r!   r   r  r  U  s    /r!   r  c                        \ rS rSrS rS rSrg)Test__implements_adviceic  c                     SSK Jn  U" U0 UD6$ )Nr   )_implements_advice)r0   r  )r   r   r   r  s       r   r   Test__implements_advice._callFUTe      B!4.2..r!   c                 6  ^^ SSK Jn  SSK Jm  SSKJn  U" S5      m " UU4S jS5      nU R                  U5        U R                  SUR                  5        U R                  UR                  U5        U R                  [        UR                  5      T/5        g )	Nr   r   r  r   r   c                   $   > \ rS rSr Y 4 Y4rSrg)@Test__implements_advice.test_no_existing_implements.<locals>.Fooio  r   N)r   r   r   r   __implements_advice_data__r    )r   r  s   r   r-   r  o  s    +/'?)C&r!   r-   r  )r0   r   r  rZ   r   r  r`   r  r   r  r1   rQ   )r   r   r   r-   r   r  s       @@r   test_no_existing_implements3Test__implements_advice.test_no_existing_implementsi  s    :?;f%	D 	D 	c5s||D	
 	$$%v	
r!   r   N)r   r   r   r   r  r  r    r   r!   r   r  r  c  s    /
r!   r  c                   8    \ rS rSrS rS rS rS rS rS r	Sr
g	)
Test_implementeri|  c                     SSK Jn  U$ )Nr   r   )r0   r   )r   r   s     r   r    Test_implementer._getTargetClass~  r   r!   c                 .    U R                  5       " U0 UD6$ r7   r   r   s      r   r   Test_implementer._makeOne  r   r!   c                 0    U R                   " U6 nU" U5      $ r7   r   )r   r{  ifaces	decorators       r   r  Test_implementer._callFUT  s    MM6*	~r!   c                     SSK Jn  U" S5      nU R                  U5      nU R                  [        U[        5       5        g r   )rZ   r   r   r  r   r   )r   r   r   r  s       r    test_nonclass_cannot_assign_attr1Test_implementer.test_nonclass_cannot_assign_attr  s1    ;f%MM$'	)Y9r!   c                 T   SSK Jn  U" S5      n " S S5      nU" 5       nU R                  U5      nU" U5      nU R                  Xd5        UR                  nU R                  UR                  S5        U R                  UR                  5        U R                  UR                  U5        g )Nr   r   r   c                       \ rS rSrSrg);Test_implementer.test_nonclass_can_assign_attr.<locals>.Fooi  r   Nr,   r   r!   r   r-   r    rC   r!   r-   z(zope.interface.tests.test_declarations.?)	rZ   r   r   r  r  r1   r   r{   rH  )r   r   r   r-   r(   r  r  r  s           r   test_nonclass_can_assign_attr.Test_implementer.test_nonclass_can_assign_attr  s    ;f%	 	 eMM$'	S>h$""MME	
 	$,,(c))40r!   c                 2   SS K nSSKJn  U" S5      n[        UR	                  5       5      n[        S5       H  n " S S5      nU R                  Xc5        M      UR                  5         [        UR	                  5       5      nSnU R                  XtU-   5        g )Nr   r   r   il  c                       \ rS rSrSrg)HTest_implementer.test_does_not_leak_on_unique_classes.<locals>.TestClassi  r   Nr,   r   r!   r   	TestClassr    r  r!   r  )	gcrZ   r   lenget_objectsranger  collectr^  )	r   r  r   r   begin_countr   r  	end_countfudge_factors	            r   $test_does_not_leak_on_unique_classes5Test_implementer.test_does_not_leak_on_unique_classes  s     	;f%"..*+tA  MM)*	  	

()	 Yl(BCr!   r   N)r   r   r   r   r   r   r  r  r   r  r    r   r!   r   r  r  |  s!    3:1$Dr!   r  c                   2    \ rS rSrS rS rS rS rS rSr	g)	Test_implementer_onlyi  c                     SSK Jn  U$ )Nr   )implementer_only)r0   r  )r   r  s     r   r   %Test_implementer_only._getTargetClass  s    @r!   c                 .    U R                  5       " U0 UD6$ r7   r   r   s      r   r   Test_implementer_only._makeOne  r   r!   c                 4    U R                  U5      nU" U5      $ r7   r  )r   r{  r|  r  s       r   r  Test_implementer_only._callFUT  s    MM%(	~r!   c                 t    SSK Jn  U" S5      nU R                  U5      nS nU R                  [        X45        g )Nr   r   r   c                      [        5       er7   r8   r   r!   r   	_function6Test_implementer_only.test_function.<locals>._function      %''r!   )rZ   r   r   r  
ValueError)r   r   r   r  r  s        r   r=   #Test_implementer_only.test_function  s4    ;f%MM$'		( 	*i;r!   c                     SSK Jn  U" S5      nU R                  U5      n " S S5      nU R                  [        X4R
                  5        g )Nr   r   r   c                       \ rS rSrS rSrg).Test_implementer_only.test_method.<locals>.Bari  c                     [        5       er7   r8   r  s    r   _method6Test_implementer_only.test_method.<locals>.Bar._method  rp  r!   r   N)r   r   r   r   r$  r    r   r!   r   Barr"    s    ,r!   r&  )rZ   r   r   r  r  r$  )r   r   r   r  r&  s        r   test_method!Test_implementer_only.test_method  s=    ;f%MM$'		, 	, 	*i=r!   r   N)
r   r   r   r   r   r   r  r=   r'  r    r   r!   r   r  r    s     3<	>r!   r  c                   8    \ rS rSrS rS rS rS rS rS r	Sr
g	)
ProvidesClassTestsi  c                     SSK Jn  U$ Nr   ProvidesClassr0   r.  r   r.  s     r   r   "ProvidesClassTests._getTargetClass  rv  r!   c                 .    U R                  5       " U0 UD6$ r7   r   r   s      r   r   ProvidesClassTests._makeOne  r   r!   c                     SSK Jn  U" S5      n " S S5      nU R                  X25      nU R                  [	        U5      U/5        g )Nr   r   r   c                       \ rS rSrSrg)?ProvidesClassTests.test_simple_class_one_interface.<locals>.Fooi  r   Nr,   r   r!   r   r-   r6    rC   r!   r-   r   r   r   r   r-   r  s        r   test_simple_class_one_interface2ProvidesClassTests.test_simple_class_one_interface  s?    ;f%	 	 }}S'ddV,r!   c                     SSK Jn  SSKJn  U" S5      n " S S5      nU R	                  XC5      nUR                  5       u  pgU R                  Xa5        U R                  XtU45        g )Nr   Providesr   r   c                       \ rS rSrSrg)/ProvidesClassTests.test___reduce__.<locals>.Fooi  r   Nr,   r   r!   r   r-   r>    rC   r!   r-   )r0   r<  rZ   r   r   rR  r  r1   )r   r<  r   r   r-   r  klassr   s           r   rS  "ProvidesClassTests.test___reduce__  sX    8;f%	 	 }}S'oo'e&T{+r!   c                     SSK Jn  U" S5      n " S S5      nU R                  X25      nXCl        U R	                  UR                  U5        g )Nr   r   r   c                       \ rS rSrSrg)2ProvidesClassTests.test___get___class.<locals>.Fooi  r   Nr,   r   r!   r   r-   rC    rC   r!   r-   rZ   r   r   r  r  r7  s        r   test___get___class%ProvidesClassTests.test___get___class  sC    ;f%	 	 }}S'c&&-r!   c                    ^ SSK Jn  U" S5      n " S S5      mU R                  TU5      nUTl        U4S jnU R	                  [
        U5        g )Nr   r   r   c                       \ rS rSrSrg)5ProvidesClassTests.test___get___instance.<locals>.Fooi  r   Nr,   r   r!   r   r-   rI    rC   r!   r-   c                  *   > T" 5       n U R                   $ r7   )r  )r(   r-   s    r   _test7ProvidesClassTests.test___get___instance.<locals>._test  s    %C###r!   )rZ   r   r   r  r  AttributeError)r   r   r   r  rK  r-   s        @r   test___get___instance(ProvidesClassTests.test___get___instance  sK    ;f%	 	 }}S$'	$ 	.%0r!   r   N)r   r   r   r   r   r   r8  rS  rE  rN  r    r   r!   r   r*  r*    s     3-,	.1r!   r*  c                   .   ^  \ rS rSrU 4S jrS rSrU =r$ )ProvidesClassStrictTestsi  c                 B   >^ [         TU ]  5       m " U4S jST5      nU$ )Nc                   "   > \ rS rSrU 4S jrSrg)@ProvidesClassStrictTests._getTargetClass.<locals>.StrictProvidesi%  c                 $   > TR                  XSS9$ NT)	base_mrosre   _do_calculate_ro)r   rW  r.  s     r   rY  QProvidesClassStrictTests._getTargetClass.<locals>.StrictProvides._do_calculate_ro&       $55d 6  r!   r   Nr   r   r   r   rY  r    r-  s   r   StrictProvidesrT  %       r!   r]  r  r   )r   r]  r.  r  s     @r   r   (ProvidesClassStrictTests._getTargetClass"  s$    /1	] 	 r!   c           	          SSK Jn  SSK Jn  SSK Jn   " S SU5      nU" U5       " S S5      5       nU R	                  XT5      nU R                  UR                  UU" U5      UU" [        5      U45        g )	Nr   rX   r   r   c                       \ rS rSrSrg)MProvidesClassStrictTests.test_overlapping_interfaces_corrected.<locals>.IBasei4  r   Nr,   r   r!   r   r   rc  4  rC   r!   r   c                       \ rS rSrSrg)LProvidesClassStrictTests.test_overlapping_interfaces_corrected.<locals>.Basei7  r   Nr,   r   r!   r   r  re  7  r.   r!   r  )r   rY   r   r   r   r1   rp   r   )r   rY   r   r   r   r  r  s          r   %test_overlapping_interfaces_corrected>ProvidesClassStrictTests.test_overlapping_interfaces_corrected-  sy     	-0.	I 	 
U		 	 
	 }}T)$&!(
 	r!   r   r   r   r   r   r   rf  r    rp  rq  s   @r   rQ  rQ    s    	 r!   rQ  c                   b    \ 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)TestProvidesClassRepriE  c                     SSK Jn  U$ r,  r/  r0  s     r   r   %TestProvidesClassRepr._getTargetClassG  rv  r!   c                 .    U R                  5       " U0 UD6$ r7   r   r   s      r   r   TestProvidesClassRepr._makeOneK  r   r!   c                    SSK Jn  U" S5      nUR                  S:X  d   eUR                  [        :X  d   e[	        U5      S[         S3:X  d   eU" S5      nU R                  [        U 5      X#5      nU R                  [	        U5      S5        g )Nr   r   r   z<InterfaceClass z.IFoo>r   z3directlyProvides(TestProvidesClassRepr, IFoo, IBar))rZ   r   r   r   rN  r   r  r1   )r   r   r   r   insts        r   test__repr__"TestProvidesClassRepr.test__repr__N  s    ;f%}}&&&(***Dz/z@@@@f%}}T$Z4JA	
r!   c                 ^    SSK Jn  UR                  nU R                  [	        U5      S5        g )Nr   dummyzIdirectlyProvides(sys.modules['zope.interface.tests.dummy'], IDummyModule))zope.interface.testsru  r  r1   rN  )r   ru  providess      r   'test__repr__module_provides_typical_use=TestProvidesClassRepr.test__repr__module_provides_typical_use]  s,     	/%%N	
r!   c                     SS K nSSKJn  UR                  n[	        UR
                  S-   5       H8  nU R                  UR                  5         UR                  X45        S S S 5        M:     g ! , (       d  f       ML  = f)Nr   rt  r  )	r  rv  ru  r  r	  HIGHEST_PROTOCOLr  PicklingErrorr  )r   r  ru  rw  protos        r   test__repr__module_after_pickle5TestProvidesClassRepr.test__repr__module_after_picklei  s\    .%%622Q67E""6#7#78X- 98 888s   A,,
A;	c                 ^   SS K nSSKJn  SSKJn  SSKJn  SSKJn  U" S5      nU" S5      nUR                  nU?U R                  [        USU5        U" XV5        UR                  n	U R                  [        U	5      S	5        U" XW5        UR                  n	U R                  [        U	5      S
5        UR                  [           n
[        U
S5      (       a   eU" XU5        U R                  [         U
S5        U R#                  U
R                  U	5        U R                  [        U	5      S5        g )Nr   alsoProvidesdirectlyProvidesr   rt  r   r   r  zAdirectlyProvides(sys.modules['zope.interface.tests.dummy'], IFoo)zGdirectlyProvides(sys.modules['zope.interface.tests.dummy'], IFoo, IBar)zfdirectlyProvides(('zope.interface.tests.dummy', 'zope.interface.tests.test_declarations'), IFoo, IBar))sysr0   r  r  rZ   r   rv  ru  r  
addCleanupsetattrr1   rN  modulesr   hasattrdelattrr  )r   r  r  r  r   ru  r   r   orig_providesrw  	my_modules              r   #test__repr__directlyProvides_module9TestProvidesClassRepr.test__repr__directlyProvides_modules  s   <@;.f%f%**F%%%NO	

 	U!%%N	
 KK)	9n5555$/N;i,,h7N	
r!   c                     SSK Jn  SSKJn  U" S5      nU R	                  X5      nU=R
                  S-  sl        U=R
                  S-  sl        U R                  [        U5      S5        g )Nr   )
ModuleTyper   r   )zsome.module)zanother.modulez9directlyProvides(('some.module', 'another.module'), IFoo))r0   r  rZ   r   r   _v_module_namesr1   rN  )r   r  r   r   rp  s        r   )test__repr__module_provides_cached_shared?TestProvidesClassRepr.test__repr__module_provides_cached_shared  s\    :;f%}}Z. 00 33JG	
r!   c                     SSK Jn  U" SSS9nU" SSS9nU" S5      nU R                  [        U 5      X$U5      nU R	                  [        U5      S5        g )	Nr   r   r   mod1r   mod2r   z>directlyProvides(TestProvidesClassRepr, IFoo, IBaz, mod2.IFoo)rZ   r   r   r  r1   rN  r   r   r   IFoo2r   rp  s         r   test__repr__duplicate_names1TestProvidesClassRepr.test__repr__duplicate_names  sU    ;f8v&9f%}}T$ZU;JL	
r!   c                     SSK Jn  SSK Jn   " S SU5      n " S S5      nU" [        U 5      5      nU R	                  XCU5      nU R                  [        U5      S5        g )	Nr   rX   r   c                       \ rS rSrSrSrg)KTestProvidesClassRepr.test__repr__implementedBy_in_interfaces.<locals>.IFooi  Does nothingr   Nr   r   r   r   __doc__r    r   r!   r   r   r        r!   r   c                       \ rS rSrSrSrg)JTestProvidesClassRepr.test__repr__implementedBy_in_interfaces.<locals>.Bari  r  r   Nr  r   r!   r   r&  r    r  r!   r&  zCdirectlyProvides(Bar, IFoo, classImplements(TestProvidesClassRepr)))r   rY   r   r  r   r1   rN  )r   rY   r   r   r&  r   rp  s          r   'test__repr__implementedBy_in_interfaces=TestProvidesClassRepr.test__repr__implementedBy_in_interfaces  sX    ,0	9 		 	 T$Z(}}S-J6	
r!   c                 n    U R                  [        U 5      5      nU R                  [        U5      S5        g )Nz'directlyProvides(TestProvidesClassRepr)r   r  r1   rN  r   rp  s     r   test__repr__empty_interfaces2TestProvidesClassRepr.test__repr__empty_interfaces  s,    }}T$Z(J5	
r!   c                    ^ ^ U 4S jm " U4S jS5      nT R                  U" 5       5      nT R                  [        U5      S5        g )Nc                  (   > T R                  S5        g )NzShould not call str)r   r  s   r   str___dont_call_meGTestProvidesClassRepr.test__repr__non_class.<locals>.str___dont_call_me  s    II+,r!   c                   &   > \ rS rSrSr Y rS rSrg);TestProvidesClassRepr.test__repr__non_class.<locals>.Objecti  r   c                     g)Nz<Object>r   r  s    r   __repr__DTestProvidesClassRepr.test__repr__non_class.<locals>.Object.__repr__  s    !r!   N)r   r   r   r   r   __str__r  r    )r  s   r   Objectr    s    I(G"r!   r  zdirectlyProvides(<Object>))r   r1   rN  )r   r  rp  r  s   `  @r   test__repr__non_class+TestProvidesClassRepr.test__repr__non_class  s<    	-	" 	" }}VX&J(	
r!   c                     SSK Jn  SSK Jn  SSKJn  U" S5      nU" U5       " S S5      5       nU" U" 5       5      nU R                  [        U5      S5        g )	Nr   r   r  r   r   c                       \ rS rSrSrg)DTestProvidesClassRepr.test__repr__providedBy_from_class.<locals>.Fooi  r   Nr,   r   r!   r   r-   r    r.   r!   r-   classImplements(Foo, IFoo))r0   r   r  rZ   r   r1   rN  )r   r   r  r   r   r-   rp  s          r   !test__repr__providedBy_from_class7TestProvidesClassRepr.test__repr__providedBy_from_class  sW    ;:;f%	T		 	 
	 #% J(	
r!   c                     SSK Jn  SSK Jn  SSK Jn  SSKJn  U" S5      nU" S5      nU" U5       " S S	5      5       nU" 5       nU" X5        U" U5      n	U R                  [        U	5      S
5        g )Nr   r  r   r  r   r   r   c                       \ rS rSrSrg)FTestProvidesClassRepr.test__repr__providedBy_alsoProvides.<locals>.Fooi  r   Nr,   r   r!   r   r-   r    r.   r!   r-   z7directlyProvides(Foo, IBar, classImplements(Foo, IFoo)))r0   r  r   r  rZ   r   r1   rN  )
r   r  r   r  r   r   r   r-   r(   rp  s
             r   #test__repr__providedBy_alsoProvides9TestProvidesClassRepr.test__repr__providedBy_alsoProvides  sp    <;:;f%f%	T		 	 
	 eS#JE	
r!   r   N)r   r   r   r   r   r   rq  rx  r~  r  r  r  r  r  r  r  r  r    r   r!   r   rj  rj  E  sD    3


..
`



(

$
 
r!   rj  c                   &    \ rS rSrS rS rS rSrg)Test_Providesi  c                     SSK Jn  U" U0 UD6$ )Nr   r;  )r0   r<  )r   r   r   r<  s       r   r  Test_Provides._callFUT  s    8$$$r!   c                    SSK Jn  SSKJn  U" S5      n0 n " S S5      n[	        XS9   U R                  XS5      nS S S 5        U R                  [        W5      U/5        U R                  XEU4   U5        g ! , (       d  f       NA= f)Nr   r  r   r   c                       \ rS rSrSrg).Test_Provides.test_no_cached_spec.<locals>.Fooi  r   Nr,   r   r!   r   r-   r    rC   r!   r-   InstanceDeclarations)	r   r  rZ   r   _Monkeyr  r1   rQ   r  )r   r  r   r   cacher-   r  s          r   test_no_cached_spec!Test_Provides.test_no_cached_spec  sr    /;f%	 	 \>==+D ?ddV,e$K($/ ?>s   A77
Bc                     SSK Jn  SSKJn  U" S5      n[	        5       n " S S5      nXS4U0n[        XS9   U R                  XS5      nS S S 5        U R                  WU5        g ! , (       d  f       N!= f)Nr   r  r   r   c                       \ rS rSrSrg)-Test_Provides.test_w_cached_spec.<locals>.Fooi)  r   Nr,   r   r!   r   r-   r  )  rC   r!   r-   r  )r   r  rZ   r   r   r  r  r  )r   r  r   r   priorr-   r  r  s           r   test_w_cached_spec Test_Provides.test_w_cached_spec#  sc    /;f%	 	 e$\>==+D ?dE" ?>s   A$$
A2r   N)r   r   r   r   r  r  r  r    r   r!   r   r  r    s    %0#r!   r  c                   ,    \ rS rSrS rS rS rS rSrg)Test_directlyProvidesi2  c                     SSK Jn  U" U0 UD6$ )Nr   r  )r0   r  )r   r   r   r  s       r   r  Test_directlyProvides._callFUT4      @,,,r!   c                     SSK Jn  SSKJn  U" S5      n " S S5      nU" 5       nU R	                  XS5        U R                  UR                  U5        U R                  [        UR                  5      U/5        g )Nr   r-  r   r   c                       \ rS rSrSrg)7Test_directlyProvides.test_w_normal_object.<locals>.Fooi=  r   Nr,   r   r!   r   r-   r  =  rC   r!   r-   	r0   r.  rZ   r   r  r   r  r1   rQ   r   r.  r   r   r-   objs         r   test_w_normal_object*Test_directlyProvides.test_w_normal_object8  l    =;f%	 	 ec m	
 	!!"TF	
r!   c                     SSK Jn  SSKJn  U" S5      n " S S5      nU R	                  XC5        U R                  UR                  U5        U R                  [        UR                  5      U/5        g )Nr   r  r   r   c                       \ rS rSrSrg)/Test_directlyProvides.test_w_class.<locals>.FooiN  r   Nr,   r   r!   r   r-   r  N  rC   r!   r-   )	r0   r  rZ   r   r  r   r  r1   rQ   r   r  r   r   r-   s        r   test_w_class"Test_directlyProvides.test_w_classI  se    =;f%	 	 	c m	
 	!!"TF	
r!   c                    ^ SSK Jn  SSKJn  U" S5      n0 m " U4S jS5      nU" 5       nU R	                  XS5        U R                  TS   U5        U R                  [        TS   5      U/5        g )Nr   r-  r   r   c                   (   > \ rS rSrS rU 4S jrSrg):Test_directlyProvides.test_w_classless_object.<locals>.Fooi_  c                 &    US:X  a  g [        U5      eNr  r8   rm  s     r   __getattribute__KTest_directlyProvides.test_w_classless_object.<locals>.Foo.__getattribute__`  s    ;&)$//r!   c                    > UTU'   g r7   r   )r   r0  valuethe_dicts      r   __setattr__FTest_directlyProvides.test_w_classless_object.<locals>.Foo.__setattr__f  s    !&r!   r   Nr   r   r   r   r  r  r    r  s   r   r-   r  _  s    0' 'r!   r-   r  )r0   r.  rZ   r   r  r   r1   rQ   )r   r.  r   r   r-   r  r  s         @r   test_w_classless_object-Test_directlyProvides.test_w_classless_objectY  sh    =;f%	' 	' ec h~6Fh~67$@r!   r   N)	r   r   r   r   r  r  r  r  r    r   r!   r   r  r  2  s    -
"
 Ar!   r  c                   &    \ rS rSrS rS rS rSrg)Test_alsoProvidesio  c                     SSK Jn  U" U0 UD6$ )Nr   r  )r0   r  )r   r   r   r  s       r   r  Test_alsoProvides._callFUTq  s    <T(R((r!   c                     SSK Jn  SSKJn  U" S5      n " S S5      nU" 5       nU R	                  XS5        U R                  UR                  U5        U R                  [        UR                  5      U/5        g )Nr   r-  r   r   c                       \ rS rSrSrg)8Test_alsoProvides.test_wo_existing_provides.<locals>.Fooiz  r   Nr,   r   r!   r   r-   r  z  rC   r!   r-   r  r  s         r   test_wo_existing_provides+Test_alsoProvides.test_wo_existing_providesu  r  r!   c                     SSK Jn  SSK Jn  SSKJn  U" S5      nU" S5      n " S S5      nU" 5       nU" Xt5        U R                  Xu5        U R                  UR                  U5        U R                  [        UR                  5      XE/5        g )	Nr   r-  r  r   r   r   c                       \ rS rSrSrg)7Test_alsoProvides.test_w_existing_provides.<locals>.Fooi  r   Nr,   r   r!   r   r-   r    rC   r!   r-   )
r0   r.  r  rZ   r   r  r   r  r1   rQ   )r   r.  r  r   r   r   r-   r  s           r   test_w_existing_provides*Test_alsoProvides.test_w_existing_provides  s    =@;f%f%	 	 e#c m	
 	!!"TL	
r!   r   N)r   r   r   r   r  r  r	  r    r   r!   r   r  r  o  s    )
"
r!   r  c                   2    \ rS rSrS rS rS rS rS rSr	g)	Test_noLongerProvidesi  c                     SSK Jn  U" U0 UD6$ )Nr   )noLongerProvides)r0   r  )r   r   r   r  s       r   r  Test_noLongerProvides._callFUT  r  r!   c                     SSK Jn  U" S5      n " S S5      nU" 5       nU R                  XB5        U R                  [	        UR
                  5      / 5        g )Nr   r   r   c                       \ rS rSrSrg)<Test_noLongerProvides.test_wo_existing_provides.<locals>.Fooi  r   Nr,   r   r!   r   r-   r    rC   r!   r-   )rZ   r   r  r1   rQ   r  )r   r   r   r-   r  s        r   r  /Test_noLongerProvides.test_wo_existing_provides  sL    ;f%	 	 ec !!"B	
r!   c                     SSK Jn  SSKJn  U" S5      n " S S5      nU" 5       nU" XS5        U R	                  XS5        U R                  [        UR                  5      / 5        g )Nr   r  r   r   c                       \ rS rSrSrg)?Test_noLongerProvides.test_w_existing_provides_hit.<locals>.Fooi  r   Nr,   r   r!   r   r-   r    rC   r!   r-   r0   r  rZ   r   r  r1   rQ   r  )r   r  r   r   r-   r  s         r   test_w_existing_provides_hit2Test_noLongerProvides.test_w_existing_provides_hit  sW    @;f%	 	 e#c !!"B	
r!   c                     SSK Jn  SSKJn  U" S5      nU" S5      n " S S5      nU" 5       nU" Xc5        U R	                  Xd5        U R                  [        UR                  5      U/5        g )Nr   r  r   r   r   c                       \ rS rSrSrg)@Test_noLongerProvides.test_w_existing_provides_miss.<locals>.Fooi  r   Nr,   r   r!   r   r-   r    rC   r!   r-   r  )r   r  r   r   r   r-   r  s          r   test_w_existing_provides_miss3Test_noLongerProvides.test_w_existing_provides_miss  sc    @;f%f%	 	 e#c !!"TF	
r!   c                     SSK Jn  SSKJn  U" S5      nU" U5       " S S5      5       nU" 5       nU R	                  [
        U R                  XS5        g )Nr   r   r   r   c                       \ rS rSrSrg)DTest_noLongerProvides.test_w_iface_implemented_by_class.<locals>.Fooi  r   Nr,   r   r!   r   r-   r!    r.   r!   r-   )r0   r   rZ   r   r  r  r  )r   r   r   r   r-   r  s         r   !test_w_iface_implemented_by_class7Test_noLongerProvides.test_w_iface_implemented_by_class  sM    ;;f%	T		 	 
	 e*dmmS?r!   r   N)
r   r   r   r   r  r  r  r  r"  r    r   r!   r   r  r    s    -


 
@r!   r  c                   2    \ rS rSrS rS rS rS rS rSr	g)	ClassProvidesBaseFallbackTestsi  c                     SSK Jn  U$ Nr   )ClassProvidesBaseFallbackr0   r(  r   r(  s     r   r   .ClassProvidesBaseFallbackTests._getTargetClass      I((r!   c                 D     " S SU R                  5       5      nU" X5      $ )Nc                       \ rS rSrS rSrg)8ClassProvidesBaseFallbackTests._makeOne.<locals>.Derivedi  c                     Xl         X l        g r7   _cls_implements)r   kis      r   rj  AClassProvidesBaseFallbackTests._makeOne.<locals>.Derived.__init__  s    	#$ r!   r1  N)r   r   r   r   rj  r    r   r!   r   r  r/    s    %r!   r  r   )r   r?  
implementsr  s       r   r   'ClassProvidesBaseFallbackTests._makeOne  s$    	%d**, 	%
 u))r!   c                     SSK Jn  U" S5      n " S S5      nU R                  X25      =oCl        U R	                  UR                  U5        g )Nr   r   r   c                       \ rS rSrSrg)GClassProvidesBaseFallbackTests.test_w_same_class_via_class.<locals>.Fooi  r   Nr,   r   r!   r   r-   r;    rC   r!   r-   rD  )r   r   r   r-   cpbps        r   test_w_same_class_via_class:ClassProvidesBaseFallbackTests.test_w_same_class_via_class  sC    ;f%	 	 #'--"::c&&-r!   c                     SSK Jn  U" S5      n " S S5      nU" 5       nU R                  X25      Ul        U R	                  UR                  U5        g )Nr   r   r   c                       \ rS rSrSrg)JClassProvidesBaseFallbackTests.test_w_same_class_via_instance.<locals>.Fooi  r   Nr,   r   r!   r   r-   rA    rC   r!   r-   rD  )r   r   r   r-   r(   s        r   test_w_same_class_via_instance=ClassProvidesBaseFallbackTests.test_w_same_class_via_instance  sG    ;f%	 	 e==3c&&-r!   c                     SSK Jn  U" S5      n " S S5      n " S SU5      nU" 5       nU R                  X25      Ul        U R	                  [
        [        US5        U R	                  [
        [        US5        g )	Nr   r   r   c                       \ rS rSrSrg)BClassProvidesBaseFallbackTests.test_w_different_class.<locals>.Fooi  r   Nr,   r   r!   r   r-   rF    rC   r!   r-   c                       \ rS rSrSrg)BClassProvidesBaseFallbackTests.test_w_different_class.<locals>.Bari  r   Nr,   r   r!   r   r&  rH    rC   r!   r&  r  )rZ   r   r   r  r  rM  getattr)r   r   r   r-   r&  bars         r   test_w_different_class5ClassProvidesBaseFallbackTests.test_w_different_class  sg    ;f%	 		# 	 e==3.'3G.'3Gr!   r   N)
r   r   r   r   r   r   r=  rB  rK  r    r   r!   r   r%  r%    s    )
	*.	.Hr!   r%  c                        \ rS rSrS rS rSrg)ClassProvidesBaseTestsi  c                     SSK Jn  U$ )Nr   )ClassProvidesBase)r0   rP  )r   rP  s     r   r   &ClassProvidesBaseTests._getTargetClass  s    A  r!   c                     SSK Jn  U$ r'  r)  r*  s     r   ro  (ClassProvidesBaseTests._getFallbackClass  r,  r!   r   N)r   r   r   r   r   ro  r    r   r!   r   rN  rN    s    !)r!   rN  c                   ,    \ rS rSrS rS rS rS rSrg)ClassProvidesTestsi"  c                     SSK Jn  U$ Nr   r  r0   r  r   r  s     r   r   "ClassProvidesTests._getTargetClass$  rv  r!   c                 .    U R                  5       " U0 UD6$ r7   r   r   s      r   r   ClassProvidesTests._makeOne(  r   r!   c                 8   SSK Jn  SSKJn  U" S5      nU" S5      nU" U5       " S S5      5       nU R	                  U[        U5      U5      =oel        U R                  UR                  U5        U R                  [        U" 5       R                  5      U/5        g )Nr   r   r   r   r   c                       \ rS rSrSrg)7ClassProvidesTests.test_w_simple_metaclass.<locals>.Fooi1  r   Nr,   r   r!   r   r-   r_  1  r.   r!   r-   )
r0   r   rZ   r   r   r  r  r  r1   rQ   r   r   r   r   r   r-   cps          r   test_w_simple_metaclass*ClassProvidesTests.test_w_simple_metaclass+  s    ;;f%f%	T		 	 
	 !%c49d CCc&&+ce001D6:r!   c                    SSK Jn  SSKJn  U" S5      nU" S5      nU" U5       " S S5      5       nU R	                  U[        U5      U5      =oel        U R                  UR                  5       [        U5      U[        U5      U445        g )Nr   r   r   r   r   c                       \ rS rSrSrg)/ClassProvidesTests.test___reduce__.<locals>.Fooi?  r   Nr,   r   r!   r   r-   rf  ?  r.   r!   r-   )	r0   r   rZ   r   r   r  r  r1   rR  r`  s          r   rS  "ClassProvidesTests.test___reduce__9  s    ;;f%f%	T		 	 
	 !%c49d CCr(S$s)T$:;	=r!   r   N)	r   r   r   r   r   r   rb  rS  r    r   r!   r   rU  rU  "  s    3;=r!   rU  c                   .   ^  \ rS rSrU 4S jrS rSrU =r$ )ClassProvidesStrictTestsiH  c                 B   >^ [         TU ]  5       m " U4S jST5      nU$ )Nc                   "   > \ rS rSrU 4S jrSrg)EClassProvidesStrictTests._getTargetClass.<locals>.StrictClassProvidesiN  c                 $   > TR                  XSS9$ rV  rX  )r   rW  r  s     r   rY  VClassProvidesStrictTests._getTargetClass.<locals>.StrictClassProvides._do_calculate_roO  r[  r!   r   Nr\  r  s   r   StrictClassProvidesrl  N  r^  r!   ro  r_  )r   ro  r  r  s     @r   r   (ClassProvidesStrictTests._getTargetClassK  s$    /1	- 	 #"r!   c           
      ,   SSK Jn  SSK Jn  SSK Jn   " S SU5      nU" U5       " S S[        5      5       nU" S	[
        40 5      nU R                  XeU5      nU R                  UR                  UU" U5      UU" [        5      U" [
        5      U45        g )
Nr   rX   r   r   c                       \ rS rSrSrg)MClassProvidesStrictTests.test_overlapping_interfaces_corrected.<locals>.IBasei]  r   Nr,   r   r!   r   r   rs  ]  rC   r!   r   c                       \ rS rSrSrg)QClassProvidesStrictTests.test_overlapping_interfaces_corrected.<locals>.metaclassi`  r   Nr,   r   r!   r   	metaclassru  `  r.   r!   rv  r{  )	r   rY   r   r   r  r   r   r1   rp   )r   rY   r   r   r   rv  r{  r  s           r   rf  >ClassProvidesStrictTests.test_overlapping_interfaces_correctedV  s     	-0.	I 	 
U		 	 
	 I
 }}SU3)$$&!(
 	r!   r   rh  rq  s   @r   ri  ri  H  s    	# r!   ri  c                   >    \ rS rSrS rS rS rS rS rS r	S r
S	rg
)TestClassProvidesRepriu  c                     SSK Jn  U$ rW  rX  rY  s     r   r   %TestClassProvidesRepr._getTargetClassw  rv  r!   c                 .    U R                  5       " U0 UD6$ r7   r   r   s      r   r   TestClassProvidesRepr._makeOne{  r   r!   c                 x    U R                  [        U 5      [        5      nU R                  [        U5      S5        g )Nz'directlyProvides(TestClassProvidesRepr)r  r  s     r   test__repr__empty'TestClassProvidesRepr.test__repr__empty~  s.    }}T$Z.J5	
r!   c                     SSK Jn   " S SU5      nU R                  [        U 5      [        U5      nU R	                  [        U5      S5        g )Nr   rX   c                       \ rS rSrSrSrg)=TestClassProvidesRepr.test__repr__providing_one.<locals>.IFooi  r  r   Nr  r   r!   r   r   r    r  r!   r   z-directlyProvides(TestClassProvidesRepr, IFoo))r   rY   r   r  r1   rN  )r   rY   r   rp  s       r   test__repr__providing_one/TestClassProvidesRepr.test__repr__providing_one  sA    ,	9 	 }}T$Zt4J;	
r!   c                     SSK Jn  U" SSS9nU" SSS9nU" S5      nU R                  [        U 5      [        X$U5      nU R	                  [        U5      S5        g )	Nr   r   r   r  r  r  r   z>directlyProvides(TestClassProvidesRepr, IFoo, IBaz, mod2.IFoo)r  r  s         r   r  1TestClassProvidesRepr.test__repr__duplicate_names  sW    ;f8v&9f%}}T$Zt5AJL	
r!   c                     SSK Jn  SSK Jn  SSKJn  U" S5      nU" U5       " S S5      5       nU" U5      nU R                  [        U5      S5        g )	Nr   r   r   r   r   c                       \ rS rSrSrg)<TestClassProvidesRepr.test__repr__implementedBy.<locals>.Fooi  r   Nr,   r   r!   r   r-   r    r.   r!   r-   r  )r0   r   r   rZ   r   r1   rN  )r   r   r   r   r   r-   rp  s          r   test__repr__implementedBy/TestClassProvidesRepr.test__repr__implementedBy  sU    =;;f%	T		 	 
	 S!J(	
r!   c                     SSK Jn   " S S5      nU" U" 5       5      nU R                  [        U5      S[         S35        U" 5       nSUl        U" U5      nU R                  [        U5      S5        g )Nr   r   c                       \ rS rSrS rSrg)RTestClassProvidesRepr.test__repr__implementedBy_generic_callable.<locals>.Callablei  c                     U $ r7   r   r  s    r   r  [TestClassProvidesRepr.test__repr__implementedBy_generic_callable.<locals>.Callable.__call__  s    r!   r   N)r   r   r   r   r  r    r   r!   r   Callabler    s    r!   r  r  z.?)zclassImplements(Callable))r0   r   r1   rN  r   )r   r   r  rp  cs        r   *test__repr__implementedBy_generic_callable@TestClassProvidesRepr.test__repr__implementedBy_generic_callable  sp    =	 	 XZ(Jxj,	

 J
QJ'	
r!   r   N)r   r   r   r   r   r   r  r  r  r  r  r    r   r!   r   ry  ry  u  s%    3





 
r!   ry  c                   2    \ rS rSrS rS rS rS rS rSr	g)	Test_directlyProvidedByi  c                     SSK Jn  U" U0 UD6$ )Nr   )directlyProvidedBy)r0   r  )r   r   r   r  s       r   r   Test_directlyProvidedBy._callFUT  r  r!   c                 z     " S S5      nU" 5       nU R                  [        U R                  U5      5      / 5        g )Nc                       \ rS rSrSrg)NTest_directlyProvidedBy.test_wo_declarations_in_class_or_instance.<locals>.Fooi  r   Nr,   r   r!   r   r-   r    rC   r!   r-   r  r  s      r   )test_wo_declarations_in_class_or_instanceATest_directlyProvidedBy.test_wo_declarations_in_class_or_instance  s3    	 	 edmmC0126r!   c                     SSK Jn  SSKJn  U" S5      nU" U5       " S S5      5       nU" 5       nU R	                  [        U R                  U5      5      / 5        g )Nr   r   r   r   c                       \ rS rSrSrg)RTest_directlyProvidedBy.test_w_declarations_in_class_but_not_instance.<locals>.Fooi  r   Nr,   r   r!   r   r-   r    r.   r!   r-   )r0   r   rZ   r   r1   rQ   r  )r   r   r   r   r-   r(   s         r   -test_w_declarations_in_class_but_not_instanceETest_directlyProvidedBy.test_w_declarations_in_class_but_not_instance  sU    ;;f%	T		 	 
	 edmmC0126r!   c                     SSK Jn  SSKJn  U" S5      n " S S5      nU" 5       nU" XS5        U R	                  [        U R                  U5      5      U/5        g )Nr   r  r   r   c                       \ rS rSrSrg)RTest_directlyProvidedBy.test_w_declarations_in_instance_but_not_class.<locals>.Fooi  r   Nr,   r   r!   r   r-   r    rC   r!   r-   )r0   r  rZ   r   r1   rQ   r  )r   r  r   r   r-   r(   s         r   -test_w_declarations_in_instance_but_not_classETest_directlyProvidedBy.test_w_declarations_in_instance_but_not_class  sM    @;f%	 	 e#dmmC01D6:r!   c                     SSK Jn  SSK Jn  SSKJn  U" S5      nU" S5      nU" U5       " S S5      5       nU" 5       nU" Xu5        U R                  [        U R                  U5      5      U/5        g )	Nr   r  r   r   r   r   c                       \ rS rSrSrg)NTest_directlyProvidedBy.test_w_declarations_in_instance_and_class.<locals>.Fooi  r   Nr,   r   r!   r   r-   r    r.   r!   r-   )r0   r  r   rZ   r   r1   rQ   r  )r   r  r   r   r   r   r-   r(   s           r   )test_w_declarations_in_instance_and_classATest_directlyProvidedBy.test_w_declarations_in_instance_and_class  sl    @;;f%f%	T		 	 
	 e#dmmC01D6:r!   r   N)
r   r   r   r   r  r  r  r  r  r    r   r!   r   r  r    s    /7
7
;;r!   r  c                   &    \ rS rSrS rS rS rSrg)Test_provideri  c                     SSK Jn  U$ )Nr   )provider)r0   r  )r   r  s     r   r   Test_provider._getTargetClass  s
    8r!   c                 .    U R                  5       " U0 UD6$ r7   r   r   s      r   r   Test_provider._makeOne  r   r!   c                     SSK Jn  SSKJn  U" S5      nU R	                  U5       " S S5      5       nU R                  UR                  U5        U R                  [        UR                  5      U/5        g )Nr   r  r   r   c                       \ rS rSrSrg)'Test_provider.test_w_class.<locals>.Fooi	  r   Nr,   r   r!   r   r-   r  	  r.   r!   r-   )	r0   r  rZ   r   r   r   r  r1   rQ   r  s        r   r  Test_provider.test_w_class  so    =;f%	t		 	 
	 	m	
 	!!"TF	
r!   r   N)r   r   r   r   r   r   r  r    r   r!   r   r  r    s    3
r!   r  c                   ,    \ rS rSrS rS rS rS rSrg)Test_moduleProvidesi  c                     SSK Jn  SSKJn  U" S5      nSXS.n0 nSR	                  SS	/5      n[        XdU5        US
   nU R                  [        U5        g )Nr   moduleProvidesr   r   zope.interface.tests.foor   r  r   
z
def foo():    moduleProvides(IFoo)r(   )r0   r  rZ   r   joinr   r  r   )r   r  r   r   r   r   CODEr(   s           r   test_called_from_function-Test_moduleProvides.test_called_from_function  sc    >;f%7#1Ayy&
  	T$5k)S)r!   c                     SSK Jn  SSKJn  U" S5      nSXS.n0 nSR	                  SS	/5      nU R                  [        5         [        XdU5        S S S 5        g ! , (       d  f       g = f)
Nr   r  r   r   r  r  r  zclass Foo(object):r  r0   r  rZ   r   r  r  r   r   )r   r  r   r   r   r   r  s          r   test_called_from_class*Test_moduleProvides.test_called_from_class'  sd    >;f%7#1Ayy &
  y)d# *))s   A
A(c                     SSK Jn  SSKJn  U" S5      nSXS.nSR	                  S/5      n[        XT5        US	   nU R                  [        U5      U/5        g )
Nr   r  r   r   r  r  r  moduleProvides(IFoo)r  )r0   r  rZ   r   r  r   r1   rQ   )r   r  r   r   r   r  r  s          r   "test_called_once_from_module_scope6Test_moduleProvides.test_called_once_from_module_scope5  s`    >;f%7#1Ayy"
  	T^$ddV,r!   c                     SSK Jn  SSKJn  U" S5      nSXS.nSR	                  SS/5      nU R                  [        5         [        XT5        S S S 5        g ! , (       d  f       g = f)	Nr   r  r   r   r  r  r  r  r  )r   r  r   r   r   r  s         r   #test_called_twice_from_module_scope7Test_moduleProvides.test_called_twice_from_module_scopeB  s_    >;f%7#1A yy""
  y) *))s   A
A%r   N)	r   r   r   r   r  r  r  r  r    r   r!   r   r  r    s    *$-r!   r  c                   `    \ rS rSrS r\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)#Test_getObjectSpecificationFallbackiQ  c                     SSK Jn  U$ )Nr   )getObjectSpecificationFallback)r0   r  )r   r  s     r   ro  5Test_getObjectSpecificationFallback._getFallbackClassS  s    N--r!   c                 .    U R                  5       " U0 UD6$ r7   r   r   s      r   r  ,Test_getObjectSpecificationFallback._callFUTZ  r   r!   c                    ^ 0 m " U4S jS5      nU" 5       nU R                  U5      nU R                  [        U5      / 5        g )Nc                   (   > \ rS rSrU 4S jrS rSrg)TTest_getObjectSpecificationFallback.test_wo_existing_provides_classless.<locals>.Fooi`  c                 d   > US:X  a  [        U5      e TU   $ ! [         a    [        U5      ef = fr  )rM  KeyError)r   r0  r  s     r   r  eTest_getObjectSpecificationFallback.test_wo_existing_provides_classless.<locals>.Foo.__getattribute__a  s?    ;&(../#D>) /(../s    /c                     [        5       er7   r8   )r   r0  r  s      r   r  `Test_getObjectSpecificationFallback.test_wo_existing_provides_classless.<locals>.Foo.__setattr__j  rp  r!   r   Nr  r  s   r   r-   r  `  s    /,r!   r-   r  r1   rQ   )r   r-   r(   r  r  s       @r   #test_wo_existing_provides_classlessGTest_getObjectSpecificationFallback.test_wo_existing_provides_classless]  s=    	, 	, e}}S!dR(r!   c                     SSK Jn  SSKJn  U" S5      nS nU" XC5        U R	                  U5      nU R                  XTR                  5        g )Nr   r  r   r   c                      [        5       er7   r8   r   r!   r   r(   OTest_getObjectSpecificationFallback.test_existing_provides_is_spec.<locals>.foov  r  r!   )r0   r  rZ   r   r  r  r  )r   r  r   r   r(   r  s         r   test_existing_provides_is_specBTest_getObjectSpecificationFallback.test_existing_provides_is_specq  sA    @;f%	( 	#}}S!d,,-r!   c                     S n[        5       Ul        U R                  U5      nU R                  [	        U5      / 5        g )Nc                      [        5       er7   r8   r   r!   r   r(   STest_getObjectSpecificationFallback.test_existing_provides_is_not_spec.<locals>.foo  r  r!   )r   r  r  r1   rQ   )r   r(   r  s      r   "test_existing_provides_is_not_specFTest_getObjectSpecificationFallback.test_existing_provides_is_not_spec}  s5    	( "8}}S!dR(r!   c                     SSK Jn  SSKJn  U" S5      n " S S5      nU" 5       nU" XS5        U R	                  U5      nU R                  [        U5      U/5        g )Nr   r  r   r   c                       \ rS rSrSrg)GTest_getObjectSpecificationFallback.test_existing_provides.<locals>.Fooi  r   Nr,   r   r!   r   r-   r    rC   r!   r-   )r0   r  rZ   r   r  r1   rQ   )r   r  r   r   r-   r(   r  s          r   test_existing_provides:Test_getObjectSpecificationFallback.test_existing_provides  sQ    @;f%	 	 e#}}S!ddV,r!   c                     SSK Jn  SSKJn  U" S5      nU" U5       " S S5      5       nU" 5       nU R	                  U5      nU R                  [        U5      U/5        g )Nr   r   r   r   c                       \ rS rSrSrg)WTest_getObjectSpecificationFallback.test_wo_provides_on_class_w_implements.<locals>.Fooi  r   Nr,   r   r!   r   r-   r    r.   r!   r-   )r0   r   rZ   r   r  r1   rQ   r   r   r   r   r-   r(   r  s          r   &test_wo_provides_on_class_w_implementsJTest_getObjectSpecificationFallback.test_wo_provides_on_class_w_implements  s[    ;;f%	T		 	 
	 e}}S!ddV,r!   c                 ~     " S S5      nU" 5       nU R                  U5      nU R                  [        U5      / 5        g )Nc                       \ rS rSrSrg)XTest_getObjectSpecificationFallback.test_wo_provides_on_class_wo_implements.<locals>.Fooi  r   Nr,   r   r!   r   r-   r    rC   r!   r-   r  r   r-   r(   r  s       r   'test_wo_provides_on_class_wo_implementsKTest_getObjectSpecificationFallback.test_wo_provides_on_class_wo_implements  7    	 	 e}}S!dR(r!   c                 B    [         R                  " X R                  SS9  g )Nr  expected_missingr   test_raisesr  r  s    r   ,test_catches_only_AttributeError_on_providesPTest_getObjectSpecificationFallback.test_catches_only_AttributeError_on_provides  s    $$--.	
r!   c                 F    [         R                  " U U R                  SS S9  g )Nr  )r  r  r  r  s    r   )test_catches_only_AttributeError_on_classMTest_getObjectSpecificationFallback.test_catches_only_AttributeError_on_class  s     $$MM(		
r!   c                 D     " S S5      nU R                  U" 5       5        g )Nc                   $    \ rS rSr\" \5      rSrg)lTest_getObjectSpecificationFallback.test_raises_AttrError_w_provides_fails_type_check_AttrError.<locals>.Fooi  r   N)r   r   r   r   r   rM  r  r    r   r!   r   r-   r    s    +N;Lr!   r-   )r  r  s     r   ;test_raises_AttrError_w_provides_fails_type_check_AttrError_Test_getObjectSpecificationFallback.test_raises_AttrError_w_provides_fails_type_check_AttrError  s    	< 	< 	cer!   c                      " S S5      nU R                  [        5       nU R                  U" 5       5        S S S 5        U R                  SWR                  R
                  S   5        g ! , (       d  f       N8= f)Nc                   $    \ rS rSr\" \5      rSrg)oTest_getObjectSpecificationFallback.test_raises_AttrError_w_provides_fails_type_check_RuntimeError.<locals>.Fooi  r   N)r   r   r   r   r   RuntimeErrorr  r    r   r!   r   r-   r    s    +L9Lr!   r-   r  r   )r  r  r  r1   	exceptionr   )r   r-   excs      r   >test_raises_AttrError_w_provides_fails_type_check_RuntimeErrorbTest_getObjectSpecificationFallback.test_raises_AttrError_w_provides_fails_type_check_RuntimeError  s[    	: 	: |,MM#%  - 	cmm&8&8&;< -,s   A))
A7r   N)r   r   r   r   ro  r   r  r  r  r  r  r  r  r  r  r  r  r    r   r!   r   r  r  Q  sE    .
 (O3)(
.)--)


	=r!   r  c                       \ rS rSrS rSrg)Test_getObjectSpecificationi  c                     SSK Jn  U$ )Nr   )getObjectSpecification)r0   r  )r   r  s     r   r   +Test_getObjectSpecification._getTargetClass  s    F%%r!   r   Nrw  r   r!   r   r  r    s    &r!   r  c                      ^  \ rS rSrS r\rS rS rS rS r	S r
S rS	 rS
 rU 4S jrU 4S jrU 4S jrU 4S jrU 4S jrS rS rSrU =r$ )Test_providedByFallbacki  c                     SSK Jn  U$ )Nr   )providedByFallback)r0   r  )r   r  s     r   ro  )Test_providedByFallback._getFallbackClass  s    B!!r!   c                 .    U R                  5       " U0 UD6$ r7   r   r   s      r   r   Test_providedByFallback._callFUT  r   r!   c                 ~     " S S5      nU" 5       nU R                  U5      nU R                  [        U5      / 5        g )Nc                       \ rS rSrSrg)NTest_providedByFallback.test_wo_providedBy_on_class_wo_implements.<locals>.Fooi  r   Nr,   r   r!   r   r-   r%    rC   r!   r-   r  r  s       r   )test_wo_providedBy_on_class_wo_implementsATest_providedByFallback.test_wo_providedBy_on_class_wo_implements  r  r!   c                     SSK Jn  SSKJn  U" S5      n " S S5      nU" 5       nU" XC5      Ul        U R                  U5      nU R                  [        U5      U/5        g )Nr   r;  r   r   c                       \ rS rSrSrg)ATest_providedByFallback.test_w_providedBy_valid_spec.<locals>.Fooi  r   Nr,   r   r!   r   r-   r*    rC   r!   r-   )r0   r<  rZ   r   r  r  r1   rQ   )r   r<  r   r   r-   r(   r  s          r   test_w_providedBy_valid_spec4Test_providedByFallback.test_w_providedBy_valid_spec  sV    8;f%	 	 e%c0}}S!ddV,r!   c                      " S S5      nU" 5       n[        5       Ul        U R                  U5      nU R                  [	        U5      / 5        g )Nc                       \ rS rSrSrg)CTest_providedByFallback.test_w_providedBy_invalid_spec.<locals>.Fooi  r   Nr,   r   r!   r   r-   r/    rC   r!   r-   )r   r  r  r1   rQ   r  s       r   test_w_providedBy_invalid_spec6Test_providedByFallback.test_w_providedBy_invalid_spec  sA    	 	 e#X}}S!dR(r!   c                     SSK Jn  SSKJn  U" S5      nU" U5       " S S5      5       nU" 5       n[	        5       Ul        U R                  U5      nU R                  [        U5      U/5        g )Nr   r   r   r   c                       \ rS rSrSrg)VTest_providedByFallback.test_w_providedBy_invalid_spec_class_w_implements.<locals>.Fooi	  r   Nr,   r   r!   r   r-   r4  	  r.   r!   r-   )	r0   r   rZ   r   r   r  r  r1   rQ   r  s          r   1test_w_providedBy_invalid_spec_class_w_implementsITest_providedByFallback.test_w_providedBy_invalid_spec_class_w_implements	  se    ;;f%	T		 	 
	 e#X}}S!ddV,r!   c                      " S S5      nU" 5       n[        5       Ul        [        5       =o2l        U R                  U5      nU R	                  XC5        g )Nc                       \ rS rSrSrg)cTest_providedByFallback.test_w_providedBy_invalid_spec_w_provides_no_provides_on_class.<locals>.Fooi	  r   Nr,   r   r!   r   r-   r9  	  rC   r!   r-   r   r  r  r  r  r   r-   r(   expectedr  s        r   >test_w_providedBy_invalid_spec_w_provides_no_provides_on_classVTest_providedByFallback.test_w_providedBy_invalid_spec_w_provides_no_provides_on_class	  sF    	 	 e#X&,h.#}}S!d%r!   c                      " S S5      nU" 5       n[        5       Ul        [        5       =o2l        [        5       Ul        U R                  U5      nU R	                  XC5        g )Nc                       \ rS rSrSrg)eTest_providedByFallback.test_w_providedBy_invalid_spec_w_provides_diff_provides_on_class.<locals>.Fooi	  r   Nr,   r   r!   r   r-   rA  	  rC   r!   r-   r:  r;  s        r   @test_w_providedBy_invalid_spec_w_provides_diff_provides_on_classXTest_providedByFallback.test_w_providedBy_invalid_spec_w_provides_diff_provides_on_class	  sP    	 	 e#X&,h.#!8}}S!d%r!   c                    SSK Jn  SSKJn  U" S5      nU" U5       " S S5      5       nU" 5       n[	        5       Ul        [	        5       =Ul        Ul        U R                  U5      nU R                  [        U5      U/5        g )Nr   r   r   r   c                       \ rS rSrSrg)eTest_providedByFallback.test_w_providedBy_invalid_spec_w_provides_same_provides_on_class.<locals>.Fooi+	  r   Nr,   r   r!   r   r-   rF  +	  r.   r!   r-   )
r0   r   rZ   r   r   r  r  r  r1   rQ   r  s          r   @test_w_providedBy_invalid_spec_w_provides_same_provides_on_classXTest_providedByFallback.test_w_providedBy_invalid_spec_w_provides_same_provides_on_class&	  sw    ;;f%	T		 	 
	 e#X.4h63+}}S!ddV,r!   c                   > SSK Jn  SSKJ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U" 5       nU R	                  [        U R                  U5      5      XC/5        [        Xg5      nU R                  U5      n	U R                  U	R                  5        U R	                  [        U	5      U/5        g )Nr   rX   r   c                       \ rS rSrSrg)PTest_providedByFallback.test_super_when_base_implements_interface.<locals>.IBasei9	  r   Nr,   r   r!   r   r   rK  9	  rC   r!   r   c                       \ rS rSrSrg)STest_providedByFallback.test_super_when_base_implements_interface.<locals>.IDerivedi<	  r   Nr,   r   r!   r   r   rM  <	  rC   r!   r   c                       \ rS rSrSrg)OTest_providedByFallback.test_super_when_base_implements_interface.<locals>.Basei?	  r   Nr,   r   r!   r   r  rO  ?	  r.   r!   r  c                       \ rS rSrSrg)RTest_providedByFallback.test_super_when_base_implements_interface.<locals>.DerivediC	  r   Nr,   r   r!   r   r  rQ  C	  r.   r!   r  
r   rY   r0   r   r1   rQ   r  r  r{   r7  )r   rY   r   r   r   r  r  derivedr  r8  r  s             r   r  ATest_providedByFallback.test_super_when_base_implements_interface5	  s    ,;	I 		u 	 
U		 	 
	 
X		d 	 
	 )dmmG457HIG%mmC #//*cUG,r!   c                 X  > SSK Jn  SSKJn   " S SU5      n " S SU5      n " S S	5      nU" U5       " S
 SU5      5       nU" 5       nU R	                  [        U R                  U5      5      U/5        [        Xg5      nU R	                  [        U R                  U5      5      / 5        g )Nr   rX   r   c                       \ rS rSrSrg)VTest_providedByFallback.test_super_when_base_doesnt_implement_interface.<locals>.IBaseiS	  r   Nr,   r   r!   r   r   rW  S	  rC   r!   r   c                       \ rS rSrSrg)YTest_providedByFallback.test_super_when_base_doesnt_implement_interface.<locals>.IDerivediV	  r   Nr,   r   r!   r   r   rY  V	  rC   r!   r   c                       \ rS rSrSrg)UTest_providedByFallback.test_super_when_base_doesnt_implement_interface.<locals>.BaseiY	  r   Nr,   r   r!   r   r  r[  Y	  rC   r!   r  c                       \ rS rSrSrg)XTest_providedByFallback.test_super_when_base_doesnt_implement_interface.<locals>.Derivedi\	  r   Nr,   r   r!   r   r  r]  \	  r.   r!   r  r  )
r   rY   r   r   r   r  r  rS  r  r  s
            r   rD  GTest_providedByFallback.test_super_when_base_doesnt_implement_interfaceO	  s    ,;	I 		u 		 	 
X		d 	 
	 )dmmG45zBG%dmmC0126r!   c                 |  > SSK Jn  SSKJn   " S SU5      n " S SU5      nU" U5       " S S	5      5       nU" 5       nU R	                  [        U R                  U5      5      U/5        [        XV5      nU R                  U5      nU R                  UR                  5        U R	                  [        U5      / 5        g )
Nr   rX   r   c                       \ rS rSrSrg)ETest_providedByFallback.test_super_when_base_is_object.<locals>.IBaseij	  r   Nr,   r   r!   r   r   ra  j	  rC   r!   r   c                       \ rS rSrSrg)HTest_providedByFallback.test_super_when_base_is_object.<locals>.IDerivedim	  r   Nr,   r   r!   r   r   rc  m	  rC   r!   r   c                       \ rS rSrSrg)GTest_providedByFallback.test_super_when_base_is_object.<locals>.Derivedip	  r   Nr,   r   r!   r   r  re  p	  r.   r!   r  rR  )
r   rY   r   r   r   r  rS  r  r8  r  s
            r   rM  6Test_providedByFallback.test_super_when_base_is_objectf	  s    ,;	I 		u 	 
X		 	 
	 )dmmG45zBG%mmC #//*cB'r!   c                   > SSK Jn  SSKJn  SSKJn   " S SU5      n " S SU5      nU" U5       " S	 S
5      5       n " S SU5      nU" 5       nU R                  [        U R                  U5      5      U/5        U" X5        U R                  [        U R                  U5      5      XT/5        [        Xx5      n	U R                  U	5      n
U R                  U
R                  5        U R                  [        U
5      U/5        g )Nr   rX   r  r   c                       \ rS rSrSrg)OTest_providedByFallback.test_super_when_object_directly_provides.<locals>.IBasei	  r   Nr,   r   r!   r   r   ri  	  rC   r!   r   c                       \ rS rSrSrg)RTest_providedByFallback.test_super_when_object_directly_provides.<locals>.IDerivedi	  r   Nr,   r   r!   r   r   rk  	  rC   r!   r   c                       \ rS rSrSrg)NTest_providedByFallback.test_super_when_object_directly_provides.<locals>.Basei	  r   Nr,   r   r!   r   r  rm  	  r.   r!   r  c                       \ rS rSrSrg)QTest_providedByFallback.test_super_when_object_directly_provides.<locals>.Derivedi	  r   Nr,   r   r!   r   r  ro  	  rC   r!   r  )r   rY   r0   r  r   r1   rQ   r  r  r{   r7  )r   rY   r  r   r   r   r  r  rS  r  r8  r  s              r   (test_super_when_object_directly_provides@Test_providedByFallback.test_super_when_object_directly_provides|	  s    ,@;	I 		u 	 
U		 	 
		d 	 )dmmG45w?+dmmG457HIG%mmC #//*cUG,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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	U" U5       " S SU5      5       n
U" Xg5       " S SX5      5       nU" 5       n[	        X5      n[	        X5      n[	        X5      nU R                  [        U R                  U5      5      XgXCU/5        U R                  [        U R                  U5      5      XCU/5        U R                  [        U R                  U5      5      XS/5        U R                  [        U R                  U5      5      U/5        g )Nr   rX   r   c                       \ rS rSrSrg)OTest_providedByFallback.test_super_multi_level_multi_inheritance.<locals>.IBasei	  r   Nr,   r   r!   r   r   rt  	  rC   r!   r   c                       \ rS rSrSrg)MTest_providedByFallback.test_super_multi_level_multi_inheritance.<locals>.IM1i	  r   Nr,   r   r!   r   rT  rv  	  rC   r!   rT  c                       \ rS rSrSrg)MTest_providedByFallback.test_super_multi_level_multi_inheritance.<locals>.IM2i	  r   Nr,   r   r!   r   rW  rx  	  rC   r!   rW  c                       \ rS rSrSrg)RTest_providedByFallback.test_super_multi_level_multi_inheritance.<locals>.IDerivedi	  r   Nr,   r   r!   r   r   rz  	  rC   r!   r   c                       \ rS rSrSrg)TTest_providedByFallback.test_super_multi_level_multi_inheritance.<locals>.IUnrelatedi	  r   Nr,   r   r!   r   r\  r|  	  rC   r!   r\  c                       \ rS rSrSrg)NTest_providedByFallback.test_super_multi_level_multi_inheritance.<locals>.Basei	  r   Nr,   r   r!   r   r  r~  	  r.   r!   r  c                       \ rS rSrSrg)LTest_providedByFallback.test_super_multi_level_multi_inheritance.<locals>.M1i	  r   Nr,   r   r!   r   ra  r  	  r.   r!   ra  c                       \ rS rSrSrg)LTest_providedByFallback.test_super_multi_level_multi_inheritance.<locals>.M2i	  r   Nr,   r   r!   r   rd  r  	  r.   r!   rd  c                       \ rS rSrSrg)QTest_providedByFallback.test_super_multi_level_multi_inheritance.<locals>.Derivedi	  r   Nr,   r   r!   r   r  r  	  r.   r!   r  rg  rh  s                   r   rm  @Test_providedByFallback.test_super_multi_level_multi_inheritance	  s}   ,;	I 		) 		) 		u 		 	 
U		 	 
	 
S		 	 
	 
S		 	 
	 
X	*	b 	 
+	 I7BlBldmmA./"C@	BdmmB/0c*	,dmmC01	'dmmC01	"r!   c                 L    [         R                  " X R                  S[        S9  g )Nr  )r  r  )r   r  r  r   r  s    r   .test_catches_only_AttributeError_on_providedByFTest_providedByFallback.test_catches_only_AttributeError_on_providedBy	  s    $$T==6F/5	7r!   c                 B    [         R                  " X R                  SS9  g )Nr  r  r  r  s    r   r  ATest_providedByFallback.test_catches_only_AttributeError_on_class	  s     	$$--+	?r!   r   )r   r   r   r   ro  r   r  r&  r+  r0  r5  r=  rB  rG  r  rD  rM  rp  rm  r  r  r    rp  rq  s   @r   r  r    s`    "
 (O3)-)-	&
&--47.(,-:/"b7
? ?r!   r  c                       \ rS rSrS rSrg)Test_providedByi	  c                     SSK Jn  U$ )Nr   r  )r0   r  )r   r  s     r   r   Test_providedBy._getTargetClass	  r<  r!   r   Nrw  r   r!   r   r  r  	  s    r!   r  c                   H    \ rS rSrS r\rS rS rS rS r	S r
S rS	 rS
rg)*ObjectSpecificationDescriptorFallbackTestsi	  c                     SSK Jn  U$ )Nr   )%ObjectSpecificationDescriptorFallback)r0   r  )r   r  s     r   ro  <ObjectSpecificationDescriptorFallbackTests._getFallbackClass	  s    	244r!   c                 .    U R                  5       " U0 UD6$ r7   r   r   s      r   r   3ObjectSpecificationDescriptorFallbackTests._makeOne	  r   r!   c                     SSK Jn  SSKJn  U" S5      n " S S5      nU" XC5      Ul        U R                  5       Ul        U R                  [        UR                  5      U/5        g )Nr   r;  r   r   c                       \ rS rSrSrg)OObjectSpecificationDescriptorFallbackTests.test_accessed_via_class.<locals>.Fooi	  r   Nr,   r   r!   r   r-   r  	  rC   r!   r-   )	r0   r<  rZ   r   r  r   r  r1   rQ   )r   r<  r   r   r-   s        r   test_accessed_via_classBObjectSpecificationDescriptorFallbackTests.test_accessed_via_class	  sV    8;f%	 	 $C.!]]_c001D6:r!   c                    SSK Jn  SSK Jn  SSKJn  U" S5      nU" S5      nU" U5       " S S5      5       nU" Xe5      Ul        U R                  5       Ul        U" 5       nU R                  [        UR                  5      U/5        g )	Nr   r;  r   r   r   r   c                       \ rS rSrSrg)ZObjectSpecificationDescriptorFallbackTests.test_accessed_via_inst_wo_provides.<locals>.Fooi	  r   Nr,   r   r!   r   r-   r  	  r.   r!   r-   )
r0   r<  r   rZ   r   r  r   r  r1   rQ   )r   r<  r   r   r   r   r-   r(   s           r   "test_accessed_via_inst_wo_providesMObjectSpecificationDescriptorFallbackTests.test_accessed_via_inst_wo_provides	  s|    8;;f%f%	T		 	 
	 $C.!]]_ec001D6:r!   c                 <   SSK Jn  SSK Jn  SSK Jn  SSKJn  U" S5      nU" S5      nU" S5      nU" U5       " S	 S
5      5       nU" X5      Ul        U R                  5       Ul        U" 5       n	U" X5        U R                  [        U	R                  5      Xu/5        g )Nr   r;  r  r   r   r   r   r   c                       \ rS rSrSrg)YObjectSpecificationDescriptorFallbackTests.test_accessed_via_inst_w_provides.<locals>.Fooi
  r   Nr,   r   r!   r   r-   r  
  r.   r!   r-   )r0   r<  r  r   rZ   r   r  r   r  r1   rQ   )
r   r<  r  r   r   r   r   r   r-   r(   s
             r   !test_accessed_via_inst_w_providesLObjectSpecificationDescriptorFallbackTests.test_accessed_via_inst_w_provides
  s    8@;;f%f%f%	T		 	 
	 $C.!]]_e#c001D<@r!   c                    ^ ^  " S S[         5      m " UU 4S jS5      nU" 5       nT R                  T5         [        US5        S S S 5        g ! , (       d  f       g = f)Nc                       \ rS rSrSrg)vObjectSpecificationDescriptorFallbackTests.test_arbitrary_exception_accessing_provides_not_caught.<locals>.MyExceptioni
  r   Nr,   r   r!   r   MyExceptionr  
  rC   r!   r  c                   N   > \ rS rSr YR	                  5       r\U 4S j5       rSrg)nObjectSpecificationDescriptorFallbackTests.test_arbitrary_exception_accessing_provides_not_caught.<locals>.Fooi 
  c                    > Ter7   r   )r   r  s    r   r  {ObjectSpecificationDescriptorFallbackTests.test_arbitrary_exception_accessing_provides_not_caught.<locals>.Foo.__provides__#
  s	    !!r!   r   N	r   r   r   r   r   r  r  r  r    )r  r   s   r   r-   r   
  s     !]]_N" "r!   r-   r  )	Exceptionr  rI  )r   r-   r(   r  s   `  @r   6test_arbitrary_exception_accessing_provides_not_caughtaObjectSpecificationDescriptorFallbackTests.test_arbitrary_exception_accessing_provides_not_caught
  sG    	) 		" 	" e{+C)* ,++s   A
Ac                    ^   " S S[         5      n " U 4S jS5      nU" 5       n[        US5      nT R                  U5        g )Nc                       \ rS rSrSrg)mObjectSpecificationDescriptorFallbackTests.test_AttributeError_accessing_provides_caught.<locals>.MyExceptioni-
  r   Nr,   r   r!   r   r  r  -
  rC   r!   r  c                   H   > \ rS rSr Y R	                  5       r\S 5       rSrg)eObjectSpecificationDescriptorFallbackTests.test_AttributeError_accessing_provides_caught.<locals>.Fooi0
  c                     [         er7   )rM  r  s    r   r  rObjectSpecificationDescriptorFallbackTests.test_AttributeError_accessing_provides_caught.<locals>.Foo.__provides__3
  s    $$r!   r   Nr  r  s   r   r-   r  0
  s     !]]_N% %r!   r-   r  )r  rI  assertIsNotNone)r   r  r-   r(   provideds   `    r   -test_AttributeError_accessing_provides_caughtXObjectSpecificationDescriptorFallbackTests.test_AttributeError_accessing_provides_caught+
  s=    	) 		% 	% e3 01X&r!   c                     SSK Jn  SSK Jn   " S SU5      nU" U5       " S S5      5       nU R                  5       Ul        [        U" 5       S5      nU R                  U5        g )	Nr   rX   r   c                       \ rS rSrSrg)ZObjectSpecificationDescriptorFallbackTests.test_None_in__provides__overrides.<locals>.IFooi?
  r   Nr,   r   r!   r   r   r  ?
  rC   r!   r   c                   $    \ rS rSr\S 5       rSrg)YObjectSpecificationDescriptorFallbackTests.test_None_in__provides__overrides.<locals>.FooiB
  c                     g r7   r   r  s    r   r  fObjectSpecificationDescriptorFallbackTests.test_None_in__provides__overrides.<locals>.Foo.__provides__E
  s    r!   r   N)r   r   r   r   r  r  r    r   r!   r   r-   r  B
  s      r!   r-   r  )r   rY   r   r   r  rI  r{   )r   rY   r   r   r-   r  s         r   !test_None_in__provides__overridesLObjectSpecificationDescriptorFallbackTests.test_None_in__provides__overrides;
  s_    ,.	9 	 
T		 	 
	 "]]_35"23(#r!   r   N)r   r   r   r   ro  r   r   r  r  r  r  r  r  r    r   r!   r   r  r  	  s2    5 (O3
;; A&+ ' $r!   r  c                       \ rS rSrS rSrg)"ObjectSpecificationDescriptorTestsiO
  c                     SSK Jn  U$ )Nr   )ObjectSpecificationDescriptor)r0   r  )r   r  s     r   r   2ObjectSpecificationDescriptorTests._getTargetClassV
  s    M,,r!   r   Nrw  r   r!   r   r  r  O
  s    -r!   r  c                   &    \ rS rSrS rS rS rSrg)r  i^
  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 r7   )modulerI  
to_restoreitemsr  )r   r  r   keyr  s        r   rj  _Monkey.__init__`
  sG    @BC 44C((*JCF' % Ds   Ac                     U $ r7   r   r  s    r   	__enter___Monkey.__enter__f
  s    r!   c                 v    U R                   R                  5        H  u  pE[        U R                  XE5        M     g r7   )r  r  r  r  )r   exc_typeexc_valexc_tbr  r  s         r   __exit___Monkey.__exit__i
  s)    ////1JCDKK, 2r!   )r  r  Nr   r   r   r   rj  r  r  r    r   r!   r   r  r  ^
  s    (-r!   r  c                   &    \ rS rSrS rS rS rSrg)r  in
  c                     Xl         [        X5      U l        U R                  R                  5       U l        U R                  R                  5         U R                  R                  U5        g r7   )r  rI  targetcopyr  clearupdate)r   r  attrnamer   s       r   rj  _MonkeyDict.__init__q
  sI    f/++**,2r!   c                     U R                   $ r7   )r  r  s    r   r  _MonkeyDict.__enter__x
  s    {{r!   c                     U R                   R                  5         U R                   R                  U R                  5        g r7   )r  r  r  r  )r   r  r  r  s       r   r  _MonkeyDict.__exit__{
  s(    4??+r!   )r  r  r  Nr  r   r!   r   r  r  n
  s    ,r!   r  )/r  unittestrv  r   r   r   #zope.interface.tests.test_interfacer   r   TestCaser#   rG   r   r  r9  r  rs  ry  r  r  r  r  r  r  r*  rQ  rj  r  r  r  r  r%  rN  rU  ri  ry  r  r  r  r  r  r  r  r  r  r  r  r   r!   r   <module>r     s    1 6 2& ( 
""  
F7(H-- 7(tH9, H9V@,4 @,F{86&&{8|c"!2!2 c"L3.'% '%T/43X5F5F /4dn
/1B1B n
b/ 4 /
h// 
2AD+ ADH >4  >F91** 91x#1 #LG
H-- G
T #H%%  #F:AH-- :Az)
)) )
X<@H-- <@~4HX%6%6 4Hn)")"#=** #=L*1 *ZM
H-- M
`3;h// 3;l
H%% 
49(++ 9xx=(*;*; x=v&"E"7&~?h// ~?B-+m$1B1B m$`	-2	-- - , ,r!   