+
    -i                         R t ^ RIt^ RIt ! R R]P                  4      tRt ! R R]P                  4      t ! R R]P                  4      t ! R	 R
]P                  4      tR# )as  Tests for advice

This module was adapted from 'protocols.tests.advice', part of the Python
Enterprise Application Kit (PEAK).  Please notify the PEAK authors
(pje@telecommunity.com and tsarna@sarna.org) if bugs are found or
Zope-specific changes are required, so that the PEAK version of this module
can be kept in sync.

PEAK is a Python application framework that interoperates with (but does
not require) Zope 3 and Twisted.  It provides tools for manipulating UML
models, object-relational persistence, aspect-oriented programming, and more.
Visit the PEAK home page at http://peak.telecommunity.com for more information.
Nc                   8   a  ] tR t^ t o R tR tR tR tRtV t	R# )FrameInfoTestc                    ^ RI Hp VP                  w  r#rEV P                  VR4       VP                  WE3 F  pV P                  WaP                  4       K   	  R# )    advisory_testingmoduleN)zope.interface.testsr   moduleLevelFrameInfoassertEqual__dict__assertIs
my_globalsselfr   kindr   f_locals	f_globalsds   &      B/usr/lib/python3/dist-packages/zope/interface/tests/test_advice.pytest_w_moduleFrameInfoTest.test_w_module"   sM    9 0 E E		x((5AMM!889 6    c                    ^ RI Hp VP                  P                  w  ppppV P	                  VR4       VP
                  V3 F  pV P                  WaP                  4       K   	  R# )r   r   classN)r	   r   NewStyleClassclassLevelFrameInfor   r   r   r   r   s   &      r   test_w_classFrameInfoTest.test_w_class*   s[    9 '44HH				w')+AMM!889 ,r   c                d   ^ RI Hp V! \        P                  ! 4       4      w  r#rEV P	                  VR4       \        P                  ! 4       pV P	                  WFP
                  4       V P	                  V\        4       4       VP                  V3 F  pV P                  V\        4       4       K  	  R# )r   getFrameInfozfunction callN)
zope.interface.advicer!   sys	_getframer   r   localsr   r   globals)r   r!   r   r   r   r   framer   s   &       r   test_inside_function_call'FrameInfoTest.test_inside_function_call5   s|    6,8,I)h/>>268,)+AMM!WY' ,r   c                   ^ RI Hp RV/p/ p\        \        W#4       V P	                  VR,          R4       V P                  VR,          V4       V P                  VR,          4       V P                  VR,          V4       R# )	r   r    r!   r   execr   r   r   N)r"   r!   r+   _FUNKY_EXECr   r   assertIsNone)r   r!   _globals_localss   &   r   test_inside_execFrameInfoTest.test_inside_execA   sk    6"L1[(,&1gj)73'(+,gk*H5r    N)
__name__
__module____qualname____firstlineno__r   r   r(   r0   __static_attributes____classdictcell____classdict__s   @r   r   r       s     :	:
(6 6r   r   zMimport sys
kind, module, f_locals, f_globals = getFrameInfo(sys._getframe())
c                   8   a  ] tR t^Rt o R tR tR tR tRtV t	R# )Test_isClassAdvisorc                    ^ RI Hp V! V/ VB # )r   )isClassAdvisor)r"   r>   )r   argskwr>   s   &*, r   _callFUTTest_isClassAdvisor._callFUTT   s    8t*r**r   c                H    V P                  V P                  V 4      R 4       R# )FNr   rA   r   s   &r   test_w_non_function'Test_isClassAdvisor.test_w_non_functionX   s    t,e4r   c                N    R  pV P                  V P                  V4      R4       R# )c                      \        4       hNNotImplementedErrorr2   r   r   foo7Test_isClassAdvisor.test_w_normal_function.<locals>.foo]       %''r   FNrD   )r   rM   s   & r   test_w_normal_function*Test_isClassAdvisor.test_w_normal_function[   s"    	( 	s+U3r   c                l    R  p\        4       Vn        V P                  V P                  V4      R4       R# )c                      \        4       hrJ   rK   r2   r   r   bar8Test_isClassAdvisor.test_w_advisor_function.<locals>.bard   rO   r   TN)objectpreviousMetaclassr   rA   )r   rT   s   & r   test_w_advisor_function+Test_isClassAdvisor.test_w_advisor_functionb   s,    	( !'s+T2r   r2   N)
r3   r4   r5   r6   rA   rF   rP   rX   r7   r8   r9   s   @r   r<   r<   R   s     +543 3r   r<   c                   D   a  ] tR t^kt o R tR tR tR tR tR t	Rt
V tR# )	Test_determineMetaclassc                    ^ RI Hp V! V/ VB # )r   )determineMetaclass)r"   r]   )r   r?   r@   r]   s   &*, r   rA    Test_determineMetaclass._callFUTm   s    <!4.2..r   c                h     ! R  R\         4      pV P                  V P                  RV4      V4       R# )c                       ] tR t^stRtR# )DTest_determineMetaclass.test_empty_w_explicit_metatype.<locals>.Metar2   Nr3   r4   r5   r6   r7   r2   r   r   Metara   s       r   rc   Nr2   typer   rA   r   rc   s   & r   test_empty_w_explicit_metatype6Test_determineMetaclass.test_empty_w_explicit_metatypeq   s+    	4 	 	r40$7r   c                p     ! R  R\         4      pV P                  V P                  V34      \         4       R# )c                       ] tR t^ztRtR# )1Test_determineMetaclass.test_single.<locals>.Metar2   Nrb   r2   r   r   rc   rl   z   rd   r   rc   Nre   rg   s   & r   test_single#Test_determineMetaclass.test_singlex   s+    	4 	 	w/6r   c                     ! R  R\         4      p ! R R\         VR7      pV P                  V P                  V\         34      V4       R# )c                       ] tR t^tRtR# )<Test_determineMetaclass.test_meta_of_class.<locals>.Metametar2   Nrb   r2   r   r   Metametarq      rd   r   rr   c                       ] tR t^tRtR# )8Test_determineMetaclass.test_meta_of_class.<locals>.Metar2   Nrb   r2   r   r   rc   rt      rd   r   rc   	metaclassNre   )r   rr   rc   s   &  r   test_meta_of_class*Test_determineMetaclass.test_meta_of_class   s;    	t 		48 	 	d|4h?r   c                     ! R  R\         4      p ! R RV4      p ! R R\         VR7      p ! R R\         VR7      pV P                  V P                  W434      V4       R	# )
c                       ] tR t^tRtR# )GTest_determineMetaclass.test_multiple_in_hierarchy_py3k.<locals>.Meta_Ar2   Nrb   r2   r   r   Meta_Ar{      rd   r   r|   c                       ] tR t^tRtR# )GTest_determineMetaclass.test_multiple_in_hierarchy_py3k.<locals>.Meta_Br2   Nrb   r2   r   r   Meta_Br~      rd   r   r   c                       ] tR t^tRtR# )BTest_determineMetaclass.test_multiple_in_hierarchy_py3k.<locals>.Ar2   Nrb   r2   r   r   Ar      rd   r   r   ru   c                       ] tR t^tRtR# )BTest_determineMetaclass.test_multiple_in_hierarchy_py3k.<locals>.Br2   Nrb   r2   r   r   Br      rd   r   r   Nre   r   r|   r   r   r   s   &    r   test_multiple_in_hierarchy_py3k7Test_determineMetaclass.test_multiple_in_hierarchy_py3k   sS    	T 		V 		 		 	 	v.7r   c                     ! R  R\         4      p ! R R\         4      p ! R R\         VR7      p ! R R\         VR7      pV P                  \        V P                  W434       R	# )
c                       ] tR t^tRtR# )KTest_determineMetaclass.test_multiple_not_in_hierarchy_py3k.<locals>.Meta_Ar2   Nrb   r2   r   r   r|   r      rd   r   r|   c                       ] tR t^tRtR# )KTest_determineMetaclass.test_multiple_not_in_hierarchy_py3k.<locals>.Meta_Br2   Nrb   r2   r   r   r   r      rd   r   r   c                       ] tR t^tRtR# )FTest_determineMetaclass.test_multiple_not_in_hierarchy_py3k.<locals>.Ar2   Nrb   r2   r   r   r   r      rd   r   r   ru   c                       ] tR t^tRtR# )FTest_determineMetaclass.test_multiple_not_in_hierarchy_py3k.<locals>.Br2   Nrb   r2   r   r   r   r      rd   r   r   N)rf   assertRaises	TypeErrorrA   r   s   &    r   #test_multiple_not_in_hierarchy_py3k;Test_determineMetaclass.test_multiple_not_in_hierarchy_py3k   sP    	T 		T 		 		 	 	)T]]QF;r   r2   N)r3   r4   r5   r6   rA   rh   rm   rw   r   r   r7   r8   r9   s   @r   r[   r[   k   s)     /87@8 < <r   r[   c                   D   a  ] tR t^t o R tR tR tR tR tR t	Rt
V tR# )	Test_minimalBasesc                    ^ RI Hp V! V4      # )r   )minimalBases)r"   r   )r   klassesr   s   && r   rA   Test_minimalBases._callFUT   s    6G$$r   c                H    V P                  V P                  . 4      . 4       R # rJ   rD   rE   s   &r   
test_emptyTest_minimalBases.test_empty   s    r*B/r   c                \    V P                  V P                  \        .4      \        .4       R # rJ   )r   rA   rf   rE   s   &r   test_w_newstyle_meta&Test_minimalBases.test_w_newstyle_meta   s    v.7r   c                `     ! R  R4      pV P                  V P                  V.4      V.4       R# )c                       ] tR t^tRtR# )2Test_minimalBases.test_w_newstyle_class.<locals>.Cr2   Nrb   r2   r   r   Cr      rd   r   r   NrD   )r   r   s   & r   test_w_newstyle_class'Test_minimalBases.test_w_newstyle_class   s+    	 	 	s+aS1r   c                    ! R  R4      p ! R RV4      p ! R RV4      p ! R R4      pV P                  V P                  WV.4      V.4       V P                  V P                  W.4      V.4       V P                  V P                  W#.4      V.4       V P                  V P                  W.4      V.4       V P                  V P                  WBV.4      W$.4       R# )	c                       ] tR t^tRtR# )@Test_minimalBases.test_simple_hierarchy_skips_implied.<locals>.Ar2   Nrb   r2   r   r   r   r      rd   r   r   c                       ] tR t^tRtR# )@Test_minimalBases.test_simple_hierarchy_skips_implied.<locals>.Br2   Nrb   r2   r   r   r   r      rd   r   r   c                       ] tR t^tRtR# )@Test_minimalBases.test_simple_hierarchy_skips_implied.<locals>.Cr2   Nrb   r2   r   r   r   r      rd   r   r   c                       ] tR t^tRtR# )@Test_minimalBases.test_simple_hierarchy_skips_implied.<locals>.Dr2   Nrb   r2   r   r   Dr      rd   r   r   NrD   )r   r   r   r   r   s   &    r   #test_simple_hierarchy_skips_implied5Test_minimalBases.test_simple_hierarchy_skips_implied   s    	 		 		 		 	 	ay1A37v.4v.4v.4ay1A6:r   c                v     ! R  R4      p ! R R4      pV P                  V P                  WV.4      W!.4       R# )c                       ] tR t^tRtR# )@Test_minimalBases.test_repeats_kicked_to_end_of_queue.<locals>.Ar2   Nrb   r2   r   r   r   r      rd   r   r   c                       ] tR t^tRtR# )@Test_minimalBases.test_repeats_kicked_to_end_of_queue.<locals>.Br2   Nrb   r2   r   r   r   r      rd   r   r   NrD   )r   r   r   s   &  r   #test_repeats_kicked_to_end_of_queue5Test_minimalBases.test_repeats_kicked_to_end_of_queue   s7    	 		 	 	ay1A6:r   r2   N)r3   r4   r5   r6   rA   r   r   r   r   r   r7   r8   r9   s   @r   r   r      s(     %082;(; ;r   r   )	__doc__r#   unittestTestCaser   r,   r<   r[   r   r2   r   r   <module>r      sc     )6H%% )6X3(++ 32<<h// <<~/;)) /;r   