%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/zope/interface/tests/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/zope/interface/tests/__pycache__/test_advice.cpython-312.pyc

�

��eJ����dZddlZddlZGd�dej�ZdZGd�dej�ZGd�d	ej�ZGd
�dej�Zy)asTests 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�$�eZdZd�Zd�Zd�Zd�Zy)�
FrameInfoTestc��ddlm}|j\}}}}|j|d�|j||fD]}|j||ju��!y)Nr��advisory_testing�module)�zope.interface.testsr�moduleLevelFrameInfo�assertEqual�__dict__�
assertTrue�
my_globals��selfr�kindr�f_locals�	f_globals�ds       �B/usr/lib/python3/dist-packages/zope/interface/tests/test_advice.py�
test_w_modulezFrameInfoTest.test_w_module"s^��9� 0� E� E�	��v�	�9�����x�(����(�I�5�	>�A��O�O�A�!1�!<�!<�<�=�	>�c���ddlm}|jj\}}}}|j	|d�|j
|fD]}|j
||ju��!y)Nrr�class)r	r�
NewStyleClass�classLevelFrameInforrr
rrs       r�test_w_classzFrameInfoTest.test_w_class*sf��9�'�4�4�H�H�	��	�	�	�����w�'����)�+�	>�A��O�O�A�!1�!<�!<�<�=�	>rc��ddlm}|tj��\}}}}|j	|d�|j|t
�u�|j|fD]}|j|t�u��y)Nr��getFrameInfoz
function call)	�zope.interface.advicer�sys�	_getframerr
�localsr�globals)rrrrrrrs       r�test_inside_function_callz'FrameInfoTest.test_inside_function_call5sk��6�,8�����,I�)��f�h�	������/�����F�H�,�-����)�+�	,�A��O�O�A���N�+�	,rc���ddlm}d|i}i}tt||�|j	|dd�|j|d|u�|j|ddu�|j|d|u�y)	Nrrrr�execrrr)r rr'�_FUNKY_EXECrr
)rr�_globals�_localss    r�test_inside_execzFrameInfoTest.test_inside_exec=sv��6�"�L�1�����[�(�G�,�������&�1�����
�+�w�6�7������)�T�1�2������,��8�9rN)�__name__�
__module__�__qualname__rrr%r+�rrrr s��>�	>�,�:rrzMimport sys
kind, module, f_locals, f_globals = getFrameInfo(sys._getframe())
c�$�eZdZd�Zd�Zd�Zd�Zy)�Test_isClassAdvisorc��ddlm}||i|��S)Nr)�isClassAdvisor)r r3)r�args�kwr3s    r�_callFUTzTest_isClassAdvisor._callFUTOs��8��t�*�r�*�*rc�F�|j|j|�d�y)NF�rr6�rs r�test_w_non_functionz'Test_isClassAdvisor.test_w_non_functionSs��������t�,�e�4rc�L�d�}|j|j|�d�y)Nc��t���N��NotImplementedErrorr/rr�fooz7Test_isClassAdvisor.test_w_normal_function.<locals>.fooW���%�'�'rFr8)rr@s  r�test_w_normal_functionz*Test_isClassAdvisor.test_w_normal_functionVs ��	(�������s�+�U�3rc�j�d�}t�|_|j|j|�d�y)Nc��t��r=r>r/rr�barz8Test_isClassAdvisor.test_w_advisor_function.<locals>.bar\rArT)�object�previousMetaclassrr6)rrEs  r�test_w_advisor_functionz+Test_isClassAdvisor.test_w_advisor_function[s*��	(� &����������s�+�T�2rN)r,r-r.r6r:rBrHr/rrr1r1Ms��+�5�4�
3rr1c�0�eZdZd�Zd�Zd�Zd�Zd�Zd�Zy)�Test_determineMetaclassc��ddlm}||i|��S)Nr)�determineMetaclass)r rL)rr4r5rLs    rr6z Test_determineMetaclass._callFUTds��<�!�4�.�2�.�.rc�f�Gd�dt�}|j|jd|�|�y)Nc��eZdZy)�DTest_determineMetaclass.test_empty_w_explicit_metatype.<locals>.MetaN�r,r-r.r/rr�MetarOi���rrQr/��typerr6�rrQs  r�test_empty_w_explicit_metatypez6Test_determineMetaclass.test_empty_w_explicit_metatypehs)��	�4�	�������r�4�0�$�7rc�n�Gd�dt�}|j|j|f�t�y)Nc��eZdZy)�1Test_determineMetaclass.test_single.<locals>.MetaNrPr/rrrQrYnrRrrQrSrUs  r�test_singlez#Test_determineMetaclass.test_singlems)��	�4�	��������w�/��6rc��Gd�dt�}Gd�dt|��}|j|j|tf�|�y)Nc��eZdZy)�<Test_determineMetaclass.test_meta_of_class.<locals>.MetametaNrPr/rr�Metametar]srRrr^c��eZdZy)�8Test_determineMetaclass.test_meta_of_class.<locals>.MetaNrPr/rrrQr`urRrrQ��	metaclassrS)rr^rQs   r�test_meta_of_classz*Test_determineMetaclass.test_meta_of_classrs;��	�t�	�	�4�8�	�	
�������d�|�4�h�?rc���Gd�dt�}Gd�d|�}Gd�dt|��}Gd�d	t|��}|j|j||f�|�y)
Nc��eZdZy)�GTest_determineMetaclass.test_multiple_in_hierarchy_py3k.<locals>.Meta_ANrPr/rr�Meta_Arf{rRrrgc��eZdZy)�GTest_determineMetaclass.test_multiple_in_hierarchy_py3k.<locals>.Meta_BNrPr/rr�Meta_Bri~rRrrjc��eZdZy)�BTest_determineMetaclass.test_multiple_in_hierarchy_py3k.<locals>.ANrPr/rr�Arl�rRrrmrac��eZdZy)�BTest_determineMetaclass.test_multiple_in_hierarchy_py3k.<locals>.BNrPr/rr�Bro�rRrrprS�rrgrjrmrps     r�test_multiple_in_hierarchy_py3kz7Test_determineMetaclass.test_multiple_in_hierarchy_py3kzsU��	�T�	�	�V�	�	���	�	���	�	
�������1�v�.��7rc���Gd�dt�}Gd�dt�}Gd�dt|��}Gd�d	t|��}|jt|j||f�y)
Nc��eZdZy)�KTest_determineMetaclass.test_multiple_not_in_hierarchy_py3k.<locals>.Meta_ANrPr/rrrgru�rRrrgc��eZdZy)�KTest_determineMetaclass.test_multiple_not_in_hierarchy_py3k.<locals>.Meta_BNrPr/rrrjrw�rRrrjc��eZdZy)�FTest_determineMetaclass.test_multiple_not_in_hierarchy_py3k.<locals>.ANrPr/rrrmry�rRrrmrac��eZdZy)�FTest_determineMetaclass.test_multiple_not_in_hierarchy_py3k.<locals>.BNrPr/rrrpr{�rRrrp)rT�assertRaises�	TypeErrorr6rqs     r�#test_multiple_not_in_hierarchy_py3kz;Test_determineMetaclass.test_multiple_not_in_hierarchy_py3k�sR��	�T�	�	�T�	�	���	�	���	�	
���)�T�]�]�Q��F�;rN)	r,r-r.r6rVrZrcrrr~r/rrrJrJbs!��/�8�
7�
@�
8� 
<rrJc�0�eZdZd�Zd�Zd�Zd�Zd�Zd�Zy)�Test_minimalBasesc��ddlm}||�S)Nr)�minimalBases)r r�)r�klassesr�s   rr6zTest_minimalBases._callFUT�s��6��G�$�$rc�F�|j|jg�g�yr=r8r9s r�
test_emptyzTest_minimalBases.test_empty�s��������r�*�B�/rc�Z�|j|jtg�tg�yr=)rr6rTr9s r�test_w_newstyle_metaz&Test_minimalBases.test_w_newstyle_meta�s���������v�.���7rc�^�Gd�d�}|j|j|g�|g�y)Nc��eZdZy)�2Test_minimalBases.test_w_newstyle_class.<locals>.CNrPr/rr�Cr��rRrr�r8)rr�s  r�test_w_newstyle_classz'Test_minimalBases.test_w_newstyle_class�s)��	�	��������s�+�a�S�1rc���Gd�d�}Gd�d|�}Gd�d|�}Gd�d�}|j|j|||g�|g�|j|j||g�|g�|j|j||g�|g�|j|j||g�|g�|j|j|||g�||g�y)	Nc��eZdZy)�@Test_minimalBases.test_simple_hierarchy_skips_implied.<locals>.ANrPr/rrrmr��rRrrmc��eZdZy)�@Test_minimalBases.test_simple_hierarchy_skips_implied.<locals>.BNrPr/rrrpr��rRrrpc��eZdZy)�@Test_minimalBases.test_simple_hierarchy_skips_implied.<locals>.CNrPr/rrr�r��rRrr�c��eZdZy)�@Test_minimalBases.test_simple_hierarchy_skips_implied.<locals>.DNrPr/rr�Dr��rRrr�r8)rrmrpr�r�s     r�#test_simple_hierarchy_skips_impliedz5Test_minimalBases.test_simple_hierarchy_skips_implied�s���	�	�	��	�	��	�	�	��������1�a�y�1�A�3�7��������1�v�.���4��������1�v�.���4��������1�v�.���4��������1�a�y�1�A�q�6�:rc�x�Gd�d�}Gd�d�}|j|j|||g�||g�y)Nc��eZdZy)�@Test_minimalBases.test_repeats_kicked_to_end_of_queue.<locals>.ANrPr/rrrmr��rRrrmc��eZdZy)�@Test_minimalBases.test_repeats_kicked_to_end_of_queue.<locals>.BNrPr/rrrpr��rRrrpr8)rrmrps   r�#test_repeats_kicked_to_end_of_queuez5Test_minimalBases.test_repeats_kicked_to_end_of_queue�s9��	�	�	�	��������1�a�y�1�A�q�6�:rN)	r,r-r.r6r�r�r�r�r�r/rrr�r��s ��%�0�8�2�

;�;rr�)	�__doc__�unittestr!�TestCaserr(r1rJr�r/rr�<module>r�sc����
�%:�H�%�%�%:�P��
3�(�+�+�3�*5<�h�/�/�5<�p%;��)�)�%;r

Zerion Mini Shell 1.0