Current File : //usr/lib/python3/dist-packages/zope/interface/tests/__pycache__/test_registry.cpython-312.pyc
�

��e������dZddlZddlmZddlmZddlmZGd�dej�Z	Gd�d	e	�Z
Gd
�dej�ZGd�d
ej�ZGd�dej�Z
Gd�dej�ZGd�de�ZGd�de�ZGd�dee�ZGd�dee�ZGd�dej�ZGd�de�ZGd�de�ZGd �d!�Zy)"zComponent Registry Tests�N��	Interface)�VerifyingAdapterRegistry��
Componentsc����eZdZd�Zdsd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z!d �Z"d!�Z#d"�Z$d#�Z%d$�Z&d%�Z'd&�Z(d'�Z)d(�Z*d)�Z+d*�Z,d+�Z-d,�Z.d-�Z/d.�Z0d/�Z1d0�Z2d1�Z3d2�Z4d3�Z5d4�Z6d5�Z7d6�Z8d7�Z9d8�Z:d9�Z;d:�Z<d;�Z=d<�Z>d=�Z?d>�Z@d?�ZAd@�ZBdA�ZCdB�ZDdC�ZEdD�ZFdE�ZG�fdF�ZH�fdG�ZIdH�ZJdI�ZKdJ�ZLdK�ZMdL�ZNdM�ZO�fdN�ZPdO�ZQdP�ZRdQ�ZSdR�ZTdS�ZUdT�ZVdU�ZWdV�ZXdW�ZYdX�ZZdY�Z[dZ�Z\d[�Z]d\�Z^d]�Z_d^�Z`d_�Zad`�Zbda�Zcdb�Zddc�Zedd�Zfde�Zgdf�Zhdg�Zidh�Zjdi�Zkdj�Zldk�Zmdl�Zndm�Zodn�Zpdo�Zqdtdp�Zrdq�Zsdr�Zt�xZuS)u�ComponentsTestsc��tS�Nr��selfs �D/usr/lib/python3/dist-packages/zope/interface/tests/test_registry.py�_getTargetClasszComponentsTests._getTargetClasss����c�6�|j�|g|��i|��Sr�r)r
�name�args�kws    r�_makeOnezComponentsTests._makeOnes"��%�t�#�#�%�d�8�T�8�R�8�8rc�@��ddlm}g��fd�}t||��}|�fS)Nr)�registryc�,���j||f�yr��append)rr�_eventss  �r�_notifyz,ComponentsTests._wrapEvents.<locals>._notify"s����N�N�D�"�:�&r)�notify)�zope.interfacer�_Monkey)r
rr�_monkeyrs    @r�_wrapEventszComponentsTests._wrapEventss'���+���	'��(�7�3�����rc��ddlm}|jd�}|j|jd�|j|j
d�|j
t|j|��|j
t|j|��|j|jj
d�|j|jj
d�|j|ji�|j|ji�|j|jg�|j|jg�y)Nr)�AdapterRegistry�testing�)�zope.interface.adapterr$r�assertEqual�__name__�	__bases__�
assertTrue�
isinstance�adapters�	utilities�_utility_registrations�_adapter_registrations�_subscription_registrations�_handler_registrations)r
r$�comps   r�test_ctor_no_basesz"ComponentsTests.test_ctor_no_bases's���:��}�}�Y�'��������	�2��������,����
�4�=�=�/�B�C����
�4�>�>�?�C�D�������0�0�"�5�������1�1�2�6�����4�4�b�9�����4�4�b�9�����9�9�2�>�����4�4�b�9rc��|jd�}|jd|f�}|j|jd�|j|j|f�|j|jj|jf�|j|j
j|j
f�y)N�baser%)rr(r)r*r-r.)r
r6r3s   r�test_ctor_w_basez ComponentsTests.test_ctor_w_base5s����}�}�V�$���}�}�Y���0��������	�2�������$��1�������0�0�4�=�=�2B�C�������1�1�D�N�N�3D�Erc�\�|jd�}|jt|�d�y)Nr%z<Components testing>�rr(�repr�r
r3s  r�
test___repr__zComponentsTests.test___repr__=s%���}�}�Y�'������d��%;�<rc��|jd�}|jd�}|j�}||f|_|j|j||f�|j|jj|j|jf�|j|jj|j|jf�y)N�base1�base2)rr*r(r-r.)r
r>r?r3s    r�test_assign_to___bases__z(ComponentsTests.test_assign_to___bases__Cs����
�
�g�&���
�
�g�&���}�}��������������%���8�������0�0��.�.�%�.�.�9�	;�������1�1��/�/�5�?�?�;�	=rc��ddlm}m}Gd�d|�}|d�}|d�Gd�d��}|�}d}|j�}|j	|||�	�|j|j|df||df�y)
Nr��named�InterfaceClassc��eZdZy)�FComponentsTests.test_registerUtility_with_component_name.<locals>.IFooN�r)�
__module__�__qualname__r&rr�IFoorFR���rrJ�fooc��eZdZy)�EComponentsTests.test_registerUtility_with_component_name.<locals>.FooNrGr&rr�FoorNV���rrO�info�rQ)�zope.interface.declarationsrCrDr�registerUtilityr(r/)	r
rCrDrJ�ifoorOrL�_infor3s	         r�(test_registerUtility_with_component_namez8ComponentsTests.test_registerUtility_with_component_nameNs���E�	�>�	��F�|��	�u��	�	�
�	��e�����}�}������S�$�U��3�����'�'��e��4�
�%���	 rc��d�}t�}|j�}|jt|j||��y)Nc��t��r��NotImplementedErrorr&rr�_factoryzQComponentsTests.test_registerUtility_both_factory_and_component.<locals>._factoryc���%�'�'r��	component�factory)�objectr�assertRaises�	TypeErrorrT�r
r\�_to_regr3s    r�/test_registerUtility_both_factory_and_componentz?ComponentsTests.test_registerUtility_both_factory_and_componentbs;��	(��(���}�}������)�T�%9�%9�$+�X�	�	?rc���ddlm}ddlm}ddlm}Gd�d|�}|d�}d}d}t
�}|j�}	|j�\}
}|
5|	j||||�ddd�|j|	jjd|||u�|j|	j||f||df�|j|	jjd|d	|f�|jt!|�d
�|d\}}
|\}|j|
i�|jt#||��|jt#|j|��|j|jj$|	u�|j|jj&|u�|j|jj(|u�|j|jj*|u�|j|jj,|u�|j|jj.du�y#1swY���xYw)Nr�rD��
Registered��UtilityRegistrationc��eZdZy)�>ComponentsTests.test_registerUtility_w_component.<locals>.IFooNrGr&rrrJrnorKrrJrQr��)rSrD�zope.interface.interfacesrj�zope.interface.registryrlrarr"rTr+r.�	_adaptersr(r/�_subscribers�lenr,r�providedrr_rQr`)r
rDrjrlrJrUrV�_namerer3r!rrr�events               r� test_registerUtility_w_componentz0ComponentsTests.test_registerUtility_w_componentjs���>�8�?�	�>�	��F�|�������(���}�}����+�+�-����
�	>�� � ��$��u�=�	>�������0�0��3�D�9�%�@�G�K�L�����4�4�T�5�[�A�!�5�$�/�	1�������4�4�Q�7��=�b�A�G�:�N�����W��q�)��1�:���b��������R� ����
�5�*�5�6����
�5�<�<�1D�E�F�������-�-��5�6�������-�-��5�6�������)�)�U�2�3�������.�.�'�9�:�������)�)�U�2�3�������,�,��4�5�#	>�	>�s�I�I(c����ddlm}ddlm}ddlm}Gd�d|�}|d�}d}d}t
���fd	�}|j�}	|j�\}
}|
5|	jd||||�
�ddd�|jt|�d�|d\}}
|\}|j|
i�|jt||��|jt|j|��|j|jj|	u�|j|jj|u�|j|jj |u�|j|jj"�u�|j|jj$|u�|j|jj&|u�y#1swY��nxYw)Nrrhrirkc��eZdZy)�<ComponentsTests.test_registerUtility_w_factory.<locals>.IFooNrGr&rrrJr|�rKrrJrQrc����Srr&�res�rr\z@ComponentsTests.test_registerUtility_w_factory.<locals>._factory������Nr�r`rp)rSrDrqrjrrrlrarr"rTr(rur+r,rrvrr_rQr`)r
rDrjrlrJrUrVrwr\r3r!rrrrxres               @r�test_registerUtility_w_factoryz.ComponentsTests.test_registerUtility_w_factory�s����>�8�?�	�>�	��F�|�������(��	��}�}����+�+�-����
�	M�� � ��t�U�E�8� �L�	M�����W��q�)��1�:���b��������R� ����
�5�*�5�6����
�5�<�<�1D�E�F�������-�-��5�6�������-�-��5�6�������)�)�U�2�3�������.�.�'�9�:�������)�)�U�2�3�������,�,��8�9�	M�	M�s�G"�"G,c��Gd�d�}d}d}|�}|j�}|jt|j|d||�y)Nc��eZdZy)�GComponentsTests.test_registerUtility_no_provided_available.<locals>.FooNrGr&rrrOr��rKrrOrQr)rrbrcrT)r
rOrVrwrer3s      r�*test_registerUtility_no_provided_availablez:ComponentsTests.test_registerUtility_no_provided_available�sL��	�	������%���}�}������)��.�.���u�e�	Mrc��ddlm}ddlm}ddlm}ddlm}Gd�d|�}Gd�d	�}|d�}d
}d}	|�}
||
|�|j�}|j�\}}
|5|j|
d|	|�ddd�|jt|
�d�|
d\}}|\}|j|i�|jt||��|jt|j|��|j|jj|u�|j|jj |u�|j|jj"|	u�|j|jj$|
u�|j|jj&|u�|j|jj(du�y#1swY��nxYw)
Nr��directlyProvidesrhrirkc��eZdZy)�>ComponentsTests.test_registerUtility_wo_provided.<locals>.IFooNrGr&rrrJr��rKrrJc��eZdZy)�=ComponentsTests.test_registerUtility_wo_provided.<locals>.FooNrGr&rrrOr��rKrrOrQrrp)rSr�rDrqrjrrrlrr"rTr(rur+r,rarrvrr_rQr`)r
r�rDrjrlrJrOrUrVrwrer3r!rrrrxs                 r� test_registerUtility_wo_providedz0ComponentsTests.test_registerUtility_wo_provided�s���@�>�8�?�	�>�	�	�	��F�|�������%����$�'��}�}����+�+�-����
�	>�� � ��$��u�=�	>�����W��q�)��1�:���b��������R� ����
�5�*�5�6����
�5�<�<�1D�E�F�������-�-��5�6�������-�-��5�6�������)�)�U�2�3�������.�.�'�9�:�������)�)�U�2�3�������,�,��4�5�	>�	>�s�/G0�0G:c�L�ddlm}Gd�d|�}|d�}d}d}t�}|j�}|j	||||�|j�\}}	|5|j	||||�ddd�|j
t|	�d�y#1swY�%xYw)Nrrhc��eZdZy)�JComponentsTests.test_registerUtility_duplicates_existing_reg.<locals>.IFooNrGr&rrrJr��rKrrJrQr)rSrDrarrTr"r(ru�
r
rDrJrUrVrwrer3r!rs
          r�,test_registerUtility_duplicates_existing_regz<ComponentsTests.test_registerUtility_duplicates_existing_reg�s���>�	�>�	��F�|�������(���}�}������W�d�E�5�9��+�+�-����
�	>�� � ��$��u�=�	>�����W��q�)�	>�	>�s�!B�B#c��ddlm}Gd�d|�}|d�}d}d}d}t�}|j�}|j	||||�|j�\}	}
|	5|j	||||�ddd�|j
t|
�d�|j
|j||f||df�|j
|jjd|d	|f�y#1swY�yxYw)
Nrrhc��eZdZy)�CComponentsTests.test_registerUtility_w_different_info.<locals>.IFooNrGr&rrrJr��rKrrJ�info1�info2r�ro�rSrDrarrTr"r(rur/r.rt)r
rDrJrU�_info1�_info2rwrer3r!rs           r�%test_registerUtility_w_different_infoz5ComponentsTests.test_registerUtility_w_different_info�s���>�	�>�	��F�|���������(���}�}������W�d�E�6�:��+�+�-����
�	?�� � ��$��v�>�	?�����W��q�)�����4�4�d�E�]�C�!�6�4�0�	2�������4�4�Q�7��=�b�A�!��	%�	?�	?�s�#C0�0C9c�V�ddlm}Gd�d|�}|d�}d}d}d}t�}t�}|j�}	|	j	||||�|j�\}
}|
5|	j	||||�ddd�|j
t|�d�|j
|	j||f||df�|j
|	j||f||df�|j
|	jjd|d	||f�y#1swY��xYw)
Nrrhc��eZdZy)�SComponentsTests.test_registerUtility_w_different_names_same_component.<locals>.IFooNrGr&rrrJr��rKrrJrQ�name1�name2rpror��r
rDrJrUrV�_name1�_name2�
_other_regrer3r!rs            r�5test_registerUtility_w_different_names_same_componentzEComponentsTests.test_registerUtility_w_different_names_same_component�s,��>�	�>�	��F�|���������X�
��(���}�}������Z��v�u�=��+�+�-����
�	?�� � ��$���>�	?�����W��q�)�����4�4�d�F�^�D�$�e�T�2�	4�����4�4�d�F�^�D�!�5�$�/�	1�������4�4�Q�7��=�b�A�$�g�/�	1�	?�	?�s�-D�D(c��ddlm}ddlm}ddlm}ddlm}Gd�d|�}|d�}d}d	}t�t�}
}	|j�}|j|	|||�|j�\}}
|5|j|
|||�ddd�|jt|
�d
�|
d\}}|\}|j|i�|jt||��|jt|j|��|j|jj|u�|j|jj |u�|j|jj"|u�|j|jj$|	u�|j|jj&|u�|j|jj(du�|
d\}}|\}|j|i�|jt||��|jt|j|��|j|jj|u�|j|jj |u�|j|jj"|u�|j|jj$|
u�|j|jj&|u�|j|jj(du�y#1swY���xYw)Nrrh��Unregisteredrirkc��eZdZy)�HComponentsTests.test_registerUtility_replaces_existing_reg.<locals>.IFooNrGr&rrrJr�rKrrJrQrr�rp)rSrDrqr�rjrrrlrarrTr"r(rur+r,rrvrr_rQr`)r
rDr�rjrlrJrUrVrw�_before�_afterr3r!rrrrxs                 r�*test_registerUtility_replaces_existing_regz:ComponentsTests.test_registerUtility_replaces_existing_regs���>�:�8�?�	�>�	��F�|������ �(�F�H����}�}������W�d�E�5�9��+�+�-����
�	=�� � ���u�e�<�	=�����W��q�)��1�:���b��������R� ����
�5�,�7�8����
�5�<�<�1D�E�F�������-�-��5�6�������-�-��5�6�������)�)�U�2�3�������.�.�'�9�:�������)�)�U�2�3�������,�,��4�5��1�:���b��������R� ����
�5�*�5�6����
�5�<�<�1D�E�F�������-�-��5�6�������-�-��5�6�������)�)�U�2�3�������.�.�&�8�9�������)�)�U�2�3�������,�,��4�5�1	=�	=�s�=M�Mc�z�ddlm}Gd�d|�}|d�}d}d}d}t�}|j�}|j	||||�|j�\}	}
|	5|j	||||�ddd�|j
|jjd|d|f�y#1swY�:xYw)	Nrrhc��eZdZy)�DComponentsTests.test_registerUtility_w_existing_subscr.<locals>.IFooNrGr&rrrJr�<rKrrJrQr�r�ro)	rSrDrarrTr"r(r.rt�r
rDrJrUrVr�r�rer3r!rs           r�&test_registerUtility_w_existing_subscrz6ComponentsTests.test_registerUtility_w_existing_subscr9s���>�	�>�	��F�|���������(���}�}������W�d�F�E�:��+�+�-����
�	?�� � ��$���>�	?�������4�4�Q�7��=�b�A�G�:�N�	?�	?�s�#B1�1B:c�&�ddlm}Gd�d|�}|d�}d}d}t�}|j�}|j	�\}}	|5|j||||d�ddd�|j
t|	�d�y#1swY�%xYw)Nrrhc��eZdZy)�;ComponentsTests.test_registerUtility_wo_event.<locals>.IFooNrGr&rrrJr�MrKrrJrQrF)rSrDrarr"rTr(rur�s
          r�test_registerUtility_wo_eventz-ComponentsTests.test_registerUtility_wo_eventJs���>�	�>�	��F�|�������(���}�}����+�+�-����
�	E�� � ��$��u�e�D�	E�����W��q�)�	E�	E�s�
B�Bc��Gd�d|j��}|�}|jt�t�|j	tt
|j���d�Gd�dt�}|jt�|�|j	tt
|j���d�y)Nc�"��eZdZdZ�fd�Z�xZS)�dComponentsTests.test_registerUtility_changes_object_identity_after.<locals>.CompThatChangesAfter1Regrc���|xjdz
c_t�|�|�|jdk(rt|j�|_yy)Nrp)�	reg_count�superrT�dictr/�r
r�	__class__s  �rrTztComponentsTests.test_registerUtility_changes_object_identity_after.<locals>.CompThatChangesAfter1Reg.registerUtility^sB������!�#����'��.��>�>�Q�&�26�t�7R�7R�2S�D�/�'r�r)rHrIr�rT�
__classcell__�r�s@r�CompThatChangesAfter1Regr�\s����I�
T�
Trr�rpc��eZdZy)�PComponentsTests.test_registerUtility_changes_object_identity_after.<locals>.IFooNrGr&rrrJr�irKrrJr��rrTrarr(ru�list�registeredUtilities)r
r�r3rJs    r�2test_registerUtility_changes_object_identity_afterzBComponentsTests.test_registerUtility_changes_object_identity_afterYs���	T�t�';�';�'=�	T�(�)�����V�X�y�1�����T�$�":�":�"<�=�>��B�	�9�	�	
���V�X�t�,�����T�$�":�":�"<�=�>��Brc�P�Gd�d|j��}|�}|jt�t�|j	tt
|j���d�Gd�dt�}|jt�|�|j	tt
|j���d�Gd�dt�}|jt�|�|j	tt
|j���d	�y)
Nc�"��eZdZdZ�fd�Z�xZS)�eComponentsTests.test_registerUtility_changes_object_identity_before.<locals>.CompThatChangesAfter2Regrc���|xjdz
c_|jdk(rt|j�|_t�|�|�y)Nrpr�)r�r�r/r�rTr�s  �rrTzuComponentsTests.test_registerUtility_changes_object_identity_before.<locals>.CompThatChangesAfter2Reg.registerUtilityts=������!�#���>�>�Q�&�26�t�7R�7R�2S�D�/���'��.rr�r�s@r�CompThatChangesAfter2Regr�rs����I�
/�
/rr�rpc��eZdZy)�QComponentsTests.test_registerUtility_changes_object_identity_before.<locals>.IFooNrGr&rrrJr��rKrrJr�c��eZdZy)�QComponentsTests.test_registerUtility_changes_object_identity_before.<locals>.IBarNrGr&rr�IBarr��rKrr��r�)r
r�r3rJr�s     r�3test_registerUtility_changes_object_identity_beforezCComponentsTests.test_registerUtility_changes_object_identity_beforeos���	/�t�';�';�'=�	/�(�)�����V�X�y�1�����T�$�":�":�"<�=�>��B�	�9�	�	
���V�X�t�,�����T�$�":�":�"<�=�>��B�	�9�	�	
���V�X�t�,�����T�$�":�":�"<�=�>��Brc�l�|j�}|jt|jddd��y)N)r_rvr`)rrbrc�unregisterUtilityr;s  r�Atest_unregisterUtility_neither_factory_nor_component_nor_providedzQComponentsTests.test_unregisterUtility_neither_factory_nor_component_nor_provided�s2���}�}������)�T�%;�%;�$(�4��	�	Grc��d�}t�}|j�}|jt|j||��y)Nc��t��rrZr&rrr\zSComponentsTests.test_unregisterUtility_both_factory_and_component.<locals>._factory�r]rr^)rarrbrcr�rds    r�1test_unregisterUtility_both_factory_and_componentzAComponentsTests.test_unregisterUtility_both_factory_and_component�s;��	(��(���}�}������)�T�%;�%;�$+�X�	�	?rc�,�ddlm}Gd�d|�}|d�}d}t�}|j�}|j	�\}}|5|j|||�}	ddd�|j
	�|j
|�y#1swY�,xYw)Nrrhc��eZdZy)�EComponentsTests.test_unregisterUtility_w_component_miss.<locals>.IFooNrGr&rrrJr��rKrrJr)rSrDrarr"r��assertFalse)
r
rDrJrUrwrer3r!r�unregs
          r�'test_unregisterUtility_w_component_missz7ComponentsTests.test_unregisterUtility_w_component_miss�s���>�	�>�	��F�|�����(���}�}����+�+�-����
�	A��*�*�7�D�%�@�E�	A����������!�	A�	A�s�B
�
Bc��ddlm}ddlm}ddlm}Gd�d|�}|d�}d}t
�}|j�}|j|||�|j�\}	}
|	5|j|||�}ddd�|j�|j|jj�|j||f|jv�|j|jj �|j#t%|
�d�|
d\}}
|\}|j#|
i�|jt'||��|jt'|j|��|j|jj(|u�|j|jj*|u�|j|jj,|u�|j|jj.|u�|j|jj0du�y#1swY���xYw)	Nrrhr�rkc��eZdZy)�@ComponentsTests.test_unregisterUtility_w_component.<locals>.IFooNrGr&rrrJr��rKrrJrrp)rSrDrqr�rrrlrarrTr"r�r+r�r.rsr/rtr(rur,rrvrr_r`)r
rDr�rlrJrUrwrer3r!rr�rrrxs               r�"test_unregisterUtility_w_componentz2ComponentsTests.test_unregisterUtility_w_component�s���>�:�?�	�>�	��F�|�����(���}�}������W�d�E�2��+�+�-����
�	A��*�*�7�D�%�@�E�	A������������1�1�2����$���$�*E�*E�E�F�������4�4�5�����W��q�)��1�:���b��������R� ����
�5�,�7�8����
�5�<�<�1D�E�F�������-�-��5�6�������-�-��5�6�������)�)�U�2�3�������.�.�'�9�:�������,�,��4�5�!	A�	A�s�*H=�=Ic����ddlm}ddlm}ddlm}Gd�d|�}|d�}d}d}t
���fd	�}|j�}	|	jd||||�
�|j�\}
}|
5|	jd|||�
�}ddd�|j�|jt|�d�|d\}
}|
\}|j|i�|jt||��|jt|j|��|j|jj|	u�|j|jj |u�|j|jj"|u�|j|jj$�u�|j|jj&|u�y#1swY��XxYw)Nrrhr�rkc��eZdZy)�>ComponentsTests.test_unregisterUtility_w_factory.<locals>.IFooNrGr&rrrJr��rKrrJrQrc����Srr&r~s�rr\zBComponentsTests.test_unregisterUtility_w_factory.<locals>._factory�rrr�rp)rSrDrqr�rrrlrarrTr"r�r+r(rur,rrvrr_r`)r
rDr�rlrJrUrVrwr\r3r!rr�rrrxres                @r� test_unregisterUtility_w_factoryz0ComponentsTests.test_unregisterUtility_w_factory�s����>�:�?�	�>�	��F�|�������(��	��}�}������T�4���x��H��+�+�-����
�	P��*�*�4��u�h�*�O�E�	P����������W��q�)��1�:���b��������R� ����
�5�,�7�8����
�5�<�<�1D�E�F�������-�-��5�6�������-�-��5�6�������)�)�U�2�3�������.�.�'�9�:�������,�,��8�9�	P�	P�s�5G!�!G+c�B�ddlm}ddlm}ddlm}ddlm}Gd�d|�}Gd�d	�}|d�}d
}d}	|�}
||
|�|j�}|j|
||	|�|j�\}}
|5|j|
d|	�}ddd�|j�|jt|
�d�|
d\}}|\}|j|i�|jt||��|jt|j|��|j|jj |u�|j|jj"|u�|j|jj$|	u�|j|jj&|
u�|j|jj(|u�|j|jj*du�y#1swY��xYw)
Nrr�rhr�rkc��eZdZy)�IComponentsTests.test_unregisterUtility_wo_explicit_provided.<locals>.IFooNrGr&rrrJr��rKrrJc��eZdZy)�HComponentsTests.test_unregisterUtility_wo_explicit_provided.<locals>.FooNrGr&rrrOr��rKrrOrQrrp�rSr�rDrqr�rrrlrrTr"r�r+r(rur,rarrvrr_rQr`�r
r�rDr�rlrJrOrUrVrwrer3r!rr�rrrxs                  r�+test_unregisterUtility_wo_explicit_providedz;ComponentsTests.test_unregisterUtility_wo_explicit_provided�s���@�>�:�?�	�>�	�	�	��F�|�������%����$�'��}�}������W�d�E�5�9��+�+�-����
�	A��*�*�7�D�%�@�E�	A����������W��q�)��1�:���b��������R� ����
�5�,�7�8����
�5�<�<�1D�E�F�������-�-��5�6�������-�-��5�6�������)�)�U�2�3�������.�.�'�9�:�������)�)�U�2�3�������,�,��4�5�	A�	A���H�Hc�B�ddlm}ddlm}ddlm}ddlm}Gd�d|�}Gd�d	�}|d�}d
}d}	|�}
||
|�|j�}|j|
||	|�|j�\}}
|5|j||	��}ddd�|j�|jt|
�d
�|
d\}}|\}|j|i�|jt||��|jt|j|��|j|jj |u�|j|jj"|u�|j|jj$|	u�|j|jj&|
u�|j|jj(|u�|j|jj*du�y#1swY��xYw)Nrr�rhr�rkc��eZdZy)�LComponentsTests.test_unregisterUtility_wo_component_or_factory.<locals>.IFooNrGr&rrrJr�rKrrJc��eZdZy)�KComponentsTests.test_unregisterUtility_wo_component_or_factory.<locals>.FooNrGr&rrrOr�rKrrOrQr�rvrrpr�r�s                  r�.test_unregisterUtility_wo_component_or_factoryz>ComponentsTests.test_unregisterUtility_wo_component_or_factory
s���@�>�:�?�	�>�	�	�	��F�|�������%����$�'��}�}������W�d�E�5�9��+�+�-����
�	F��*�*�D�u�*�E�E�	F�	
���������W��q�)��1�:���b��������R� ����
�5�,�7�8����
�5�<�<�1D�E�F�������-�-��5�6�������-�-��5�6�������)�)�U�2�3�������.�.�'�9�:�������)�)�U�2�3�������,�,��4�5�	F�	F�r�c��ddlm}Gd�d|�}|d�}d}d}d}t�}|j�}|j	||||�|j	||||�|j�\}	}
|	5|j
|||�ddd�|j|jjd|d|f�y#1swY�:xYw)	Nrrhc��eZdZy)�FComponentsTests.test_unregisterUtility_w_existing_subscr.<locals>.IFooNrGr&rrrJr�0rKrrJrQr�r�ro�
rSrDrarrTr"r�r(r.rtr�s           r�(test_unregisterUtility_w_existing_subscrz8ComponentsTests.test_unregisterUtility_w_existing_subscr-s���>�	�>�	��F�|���������(���}�}������W�d�F�E�:����W�d�F�E�:��+�+�-����
�	:��"�"�7�D�&�9�	:�������4�4�Q�7��=�b�A�G�:�N�	:�	:���7C�C
c��ddlm}Gd�d|�}|d�}d}d}d}t�}|j�}|j	||||�|j	||||�|j�\}	}
|	5|j
|||�ddd�|j|jjd|d|f�y#1swY�:xYw)	Nrrhc��eZdZy)�SComponentsTests.test_unregisterUtility_w_existing_subscr_non_hashable.<locals>.IFooNrGr&rrrJrBrKrrJrQr�r�ro)
rSrDr�rrTr"r�r(r.rtr�s           r�5test_unregisterUtility_w_existing_subscr_non_hashablezEComponentsTests.test_unregisterUtility_w_existing_subscr_non_hashable?s���>�	�>�	��F�|���������&���}�}������W�d�F�E�:����W�d�F�E�:��+�+�-����
�	:��"�"�7�D�&�9�	:�������4�4�Q�7��=�b�A�G�:�N�	:�	:�rc��ddlm}ddlm}Gd�d|�}|d�}d}d}d}t	�}|j�}	|	j
||||�|	j
||||�|j�\}
}|
5|	j|||�ddd�|j|	jjd|d	|f�y#1swY�:xYw)
Nrrh)�_UtilityRegistrationsc��eZdZy)�_ComponentsTests.test_unregisterUtility_w_existing_subscr_non_hashable_fresh_cache.<locals>.IFooNrGr&rrrJr	WrKrrJrQr�r�ro)rSrDrrrr�rrTr"r�r(r.rt)r
rDrrJrUrVr�r�rer3r!rs            r�Atest_unregisterUtility_w_existing_subscr_non_hashable_fresh_cachezQComponentsTests.test_unregisterUtility_w_existing_subscr_non_hashable_fresh_cacheQs���	?�A�	�>�	��F�|���������&���}�}������W�d�F�E�:����W�d�F�E�:��+�+�-����
�	:��"�"�7�D�&�9�	:�������4�4�Q�7��=�b�A�G�:�N�	:�	:�s�=C
�
Cc���ddlm}Gd�d|�}|d�}d}d}d}t�}|j�}|j	||||�|j	||||�|jd�|j	||||�|j
�\}	}
|	5|j|||�ddd�|jdt|jj��y#1swY�9xYw)	Nrrhc��eZdZy)�]ComponentsTests.test_unregisterUtility_w_existing_subscr_non_hashable_reinitted.<locals>.IFooNrGr&rrrJr
lrKrrJrQr�r�r6)rSrDr�rrT�__init__r"r�r(rur.rtr�s           r�?test_unregisterUtility_w_existing_subscr_non_hashable_reinittedzOComponentsTests.test_unregisterUtility_w_existing_subscr_non_hashable_reinittedgs���	?�	�>�	��F�|���������&���}�}������W�d�F�E�:����W�d�F�E�:�	
�
�
�f�����W�d�F�E�:��+�+�-����
�	:��"�"�7�D�&�9�	:�	
����C���� ;� ;�<�=�	:�	:�s�C(�(C1c��ddlm}Gd�d|�}|d�}d}d}d}t�}t�}|j�}	|	j	||||�|	j	||||�|j�\}
}|
5|	j
|||�ddd�|j|	jjd|d|f�y#1swY�:xYw)	Nrrhc��eZdZy)�VComponentsTests.test_unregisterUtility_w_existing_subscr_other_component.<locals>.IFooNrGr&rrrJr�rKrrJrQr�r�ror�r�s            r�8test_unregisterUtility_w_existing_subscr_other_componentzHComponentsTests.test_unregisterUtility_w_existing_subscr_other_component�s���>�	�>�	��F�|���������X�
��(���}�}������Z��v�u�=����W�d�F�E�:��+�+�-����
�	:��"�"�7�D�&�9�	:�������4�4�Q�7��=�b�A�$��	(�	:�	:���C�Cc��ddlm}Gd�d|�}|d�}d}d}d}t�}t�}|j	�}	|	j||||�|	j||||�|j
�\}
}|
5|	j|||�ddd�|j|	jjd|d|f�y#1swY�:xYw)	Nrrhc��eZdZy)�aComponentsTests.test_unregisterUtility_w_existing_subscr_other_component_mixed_hash.<locals>.IFooNrGr&rrrJr�rKrrJrQr�r�ro)rSrDrar�rrTr"r�r(r.rtr�s            r�Ctest_unregisterUtility_w_existing_subscr_other_component_mixed_hashzSComponentsTests.test_unregisterUtility_w_existing_subscr_other_component_mixed_hash�s���>�	�>�	��F�|���������X�
��&���}�}������Z��v�u�=����W�d�F�E�:��+�+�-����
�	:��"�"�7�D�&�9�	:�������4�4�Q�7��=�b�A�$��	(�	:�	:�rc�v�|j�}|jt|j��g�yr)rr(r�r�r;s  r�test_registeredUtilities_emptyz.ComponentsTests.test_registeredUtilities_empty�s+���}�}�������d�6�6�8�9�2�>rc��ddlm}ddlm}Gd�d|�}|d�}d}d}d}t	�}|j�}	|	j
||||�|	j
||||�t|	j�d	��
�}
|jt|
�d�|jt|
d|��|j|
dj|	u�|j|
dj|u�|j|
dj|u�|j|
dj |u�|j|
dj"|u�|j|
dj$du�|jt|
d|��|j|
dj|	u�|j|
dj|u�|j|
dj|u�|j|
dj |u�|j|
dj"|u�|j|
dj$du�y)
Nrrhrkc��eZdZy)�?ComponentsTests.test_registeredUtilities_notempty.<locals>.IFooNrGr&rrrJr�rKrrJrQr�r�c��|jSr�r��rs r�<lambda>zCComponentsTests.test_registeredUtilities_notempty.<locals>.<lambda>�s
��q�v�v�r��keyr�rp)rSrDrrrlrarrT�sortedr�r(rur+r,rrvrr_rQr`)r
rDrlrJrUrVr�r�rer3�regs           r�!test_registeredUtilities_notemptyz1ComponentsTests.test_registeredUtilities_notempty�s���>�?�	�>�	��F�|���������(���}�}������W�d�F�E�:����W�d�F�E�:��T�-�-�/�5E�F������S��1�%����
�3�q�6�+>�?�@�����A����4�/�0�����A����4�/�0�����A����v�-�.�����A��(�(�G�3�4�����A����u�,�-�����A����$�.�/����
�3�q�6�+>�?�@�����A����4�/�0�����A����4�/�0�����A����v�-�.�����A��(�(�G�3�4�����A����u�,�-�����A����$�.�/rc��ddlm}Gd�d|�}|d�}|j�}|j|j	|�du�y)Nrrhc��eZdZy)�?ComponentsTests.test_queryUtility_miss_no_default.<locals>.IFooNrGr&rrrJr*�rKrrJ)rSrDrr+�queryUtility�r
rDrJrUr3s     r�!test_queryUtility_miss_no_defaultz1ComponentsTests.test_queryUtility_miss_no_default�sA��>�	�>�	��F�|���}�}�������)�)�$�/�4�7�8rc��ddlm}Gd�d|�}|d�}|j�}t�}|j	|j||��|u�y)Nrrhc��eZdZy)�>ComponentsTests.test_queryUtility_miss_w_default.<locals>.IFooNrGr&rrrJr0�rKrrJ��default)rSrDrrar+r+)r
rDrJrUr3�_defaults      r� test_queryUtility_miss_w_defaultz0ComponentsTests.test_queryUtility_miss_w_default�sM��>�	�>�	��F�|���}�}����8������)�)�$��)�A�X�M�Nrc���ddlm}Gd�d|�}|d�}t�}|j�}|j	||�|j|j
|�|u�y)Nrrhc��eZdZy)�3ComponentsTests.test_queryUtility_hit.<locals>.IFooNrGr&rrrJr7�rKrrJ)rSrDrarrTr+r+�r
rDrJrUrer3s      r�test_queryUtility_hitz%ComponentsTests.test_queryUtility_hit�sX��>�	�>�	��F�|���(���}�}������W�d�+�����)�)�$�/�7�:�;rc��ddlm}ddlm}Gd�d|�}|d�}|j	�}|j||j|�y)Nrrh��ComponentLookupErrorc��eZdZy)�2ComponentsTests.test_getUtility_miss.<locals>.IFooNrGr&rrrJr>�rKrrJ)rSrDrqr<rrb�
getUtility)r
rDr<rJrUr3s      r�test_getUtility_missz$ComponentsTests.test_getUtility_miss�s?��>�B�	�>�	��F�|���}�}������.�����Frc���ddlm}Gd�d|�}|d�}t�}|j�}|j	||�|j|j
|�|u�y)Nrrhc��eZdZy)�1ComponentsTests.test_getUtility_hit.<locals>.IFooNrGr&rrrJrC�rKrrJ)rSrDrarrTr+r?r8s      r�test_getUtility_hitz#ComponentsTests.test_getUtility_hit�sV��>�	�>�	��F�|���(���}�}������W�d�+��������-��8�9rc��ddlm}Gd�d|�}|d�}|j�}|jt	|j|��g�y)Nrrhc��eZdZy)�7ComponentsTests.test_getUtilitiesFor_miss.<locals>.IFooNrGr&rrrJrG�rKrrJ)rSrDrr(r��getUtilitiesForr,s     r�test_getUtilitiesFor_missz)ComponentsTests.test_getUtilitiesFor_miss�sE��>�	�>�	��F�|���}�}�������d�2�2�4�8�9�2�>rc�"�ddlm}Gd�d|�}|d�}d}d}t�}|j�}|j	|||��|j	|||��|jt
|j|��||f||fg�y)Nrrhc��eZdZy)�6ComponentsTests.test_getUtilitiesFor_hit.<locals>.IFooNrGr&rrrJrLrKrrJr�r�r)rSrDrarrTr(r%rH�r
rDrJrUr�r�rer3s        r�test_getUtilitiesFor_hitz(ComponentsTests.test_getUtilitiesFor_hits���>�	�>�	��F�|�������(���}�}������W�d���8����W�d���8������ 4� 4�T� :�;�!�7�+�f�g�->�?�	Arc��ddlm}Gd�d|�}|d�}|j�}|jt	|j|��g�y)Nrrhc��eZdZy)�DComponentsTests.test_getAllUtilitiesRegisteredFor_miss.<locals>.IFooNrGr&rrrJrQrKrrJ)rSrDrr(r��getAllUtilitiesRegisteredForr,s     r�&test_getAllUtilitiesRegisteredFor_missz6ComponentsTests.test_getAllUtilitiesRegisteredFor_misssE��>�	�>�	��F�|���}�}�������d�?�?��E�F��Krc��ddlm}Gd�d|�}|d�}d}d}t�}|j�}|j	|||��|j	|||��|jt
|j|��|g�y)Nrrhc��eZdZy)�CComponentsTests.test_getAllUtilitiesRegisteredFor_hit.<locals>.IFooNrGr&rrrJrVrKrrJr�r�r)rSrDrarrTr(r�rRrMs        r�%test_getAllUtilitiesRegisteredFor_hitz5ComponentsTests.test_getAllUtilitiesRegisteredFor_hits���>�	�>�	��F�|�������(���}�}������W�d���8����W�d���8�����d�?�?��E�F�!��	$rc��ddlm}m}Gd�d|�}|d�}|d�}|d�Gd�d��}d	}|j�}|j	||f||�
�|j|j|f|df||f�y)NrrBc��eZdZy)�FComponentsTests.test_registerAdapter_with_component_name.<locals>.IFooNrGr&rrrJrZ/rKrrJr�rLc��eZdZy)�EComponentsTests.test_registerAdapter_with_component_name.<locals>.FooNrGr&rrrOr\4rPrrOrQrR)rSrCrDr�registerAdapterr(r0)	r
rCrDrJrU�ibarrOrVr3s	         r�(test_registerAdapter_with_component_namez8ComponentsTests.test_registerAdapter_with_component_name+s���E�	�>�	��F�|���F�|��	�u��	�	�
�	����}�}������S�4�'�4�e��<�����'�'����u�(<�=�
�%�L�	rc��ddlm}ddlm}ddlm}Gd�d|�}|d�}|d�}d}d	}d
�}	|j
�}
|j�\}}|5|
j|	|f|||�ddd�|j|
jjd||||	u�|j|
j|f||f|	|f�|jt|�d�|d\}
}|
\}|j|i�|jt||��|jt|j |��|j|j j"|
u�|j|j j$|u�|j|j j&|f�|j|j j(|u�|j|j j*|u�|j|j j,|	u�y#1swY���xYw)Nrrhri��AdapterRegistrationc��eZdZy)�SComponentsTests.test_registerAdapter_w_explicit_provided_and_required.<locals>.IFooNrGr&rrrJrdErKrrJr�rQrc��t��rrZ��contexts rr\zWComponentsTests.test_registerAdapter_w_explicit_provided_and_required.<locals>._factoryLr]rrp�rSrDrqrjrrrbrr"r]r+r-rsr(r0rur,rarrv�requiredrrQr`)r
rDrjrbrJrUr^rVrwr\r3r!rrrrxs                r�5test_registerAdapter_w_explicit_provided_and_requiredzEComponentsTests.test_registerAdapter_w_explicit_provided_and_required@s���>�8�?�	�>�	��F�|���F�|������	(��}�}����+�+�-����
�	H�� � ��D�7�D�%��G�	H�����
�
�/�/��2�4�8��>�u�E�#�$�	%�����4�4�d�W�d�E�5I�J�"�E�*�	,�����W��q�)��1�:���b��������R� ����
�5�*�5�6����
�5�<�<�1D�E�F�������-�-��5�6�������-�-��5�6�������.�.���8�������)�)�U�2�3�������)�)�U�2�3�������,�,��8�9�#	H�	H�s�H5�5H?c��ddlm}Gd�d|�}|d�}d}d}Gd�d	�}|j�}|jt|j
||f||�
�y)Nrrhc��eZdZy)�HComponentsTests.test_registerAdapter_no_provided_available.<locals>.IFooNrGr&rrrJrmfrKrrJr�rQrc��eZdZy)�LComponentsTests.test_registerAdapter_no_provided_available.<locals>._FactoryNrGr&rr�_FactoryromrKrrp�rrQ�rSrDrrbrcr])r
rDrJr^rVrwrpr3s        r�*test_registerAdapter_no_provided_availablez:ComponentsTests.test_registerAdapter_no_provided_availablecse��>�	�>�	��F�|������	�	��}�}������)�T�%9�%9�8�d�W�$�5�	�	2rc���ddlm}ddlm}ddlm}ddlm}Gd�d|�}|d�}|d�}d	}d
}	t�}
||�Gd�d��}|j�}|j�\}
}|
5|j||f|	|�
�ddd�|j|jjd|||	|u�|j|j|f||	f||f�|jt!|�d�|d\}}|\}|j|i�|jt#||��|jt#|j|��|j|jj$|u�|j|jj&|u�|j|jj(|f�|j|jj*|	u�|j|jj,|u�|j|jj.|u�y#1swY���xYw)Nrrh��implementerrirac��eZdZy)�GComponentsTests.test_registerAdapter_wo_explicit_provided.<locals>.IFooNrGr&rrrJrxzrKrrJr�rQrc��eZdZy)�KComponentsTests.test_registerAdapter_wo_explicit_provided.<locals>._FactoryNrGr&rrrprz�rPrrprqrp)rSrDrvrqrjrrrbrarr"r]r+r-rsr(r0rur,rrvrirrQr`)r
rDrvrjrbrJrUr^rVrwrerpr3r!rrrrxs                  r�)test_registerAdapter_wo_explicit_providedz9ComponentsTests.test_registerAdapter_wo_explicit_providedts��>�;�8�?�	�>�	��F�|���F�|�������(��	�T�	�	�	�
�	��}�}����+�+�-����
�	L�� � ��D�7��U� �K�	L�����
�
�/�/��2�4�8��>�u�E�#�$�	%�����4�4�d�W�d�E�5I�J�"�E�*�	,�����W��q�)��1�:���b��������R� ����
�5�*�5�6����
�5�<�<�1D�E�F�������-�-��5�6�������-�-��5�6�������.�.���8�������)�)�U�2�3�������)�)�U�2�3�������,�,��8�9�#	L�	L�s�<I�I!c��ddlm}Gd�d|�}|d�}d}d}Gd�d�}|j�}|jt|j
||||�	�y)
Nrrhc��eZdZy)�HComponentsTests.test_registerAdapter_no_required_available.<locals>.IFooNrGr&rrrJr~�rKrrJrQrc��eZdZy)�LComponentsTests.test_registerAdapter_no_required_available.<locals>._FactoryNrGr&rrrpr��s��rrp�rvrrQrr�r
rDrJrUrVrwrpr3s        r�*test_registerAdapter_no_required_availablez:ComponentsTests.test_registerAdapter_no_required_available�sb��>�	�>�	��F�|������	�	��}�}������)�T�%9�%9�8�#'�e�%�	�	Arc	���ddlm}Gd�d|�}|d�}|d�}d}d}Gd�d	�}|j�}|jt|j
|||||�
�y)Nrrhc��eZdZy)�EComponentsTests.test_registerAdapter_w_invalid_required.<locals>.IFooNrGr&rrrJr��rKrrJr�rQrc��eZdZy)�IComponentsTests.test_registerAdapter_w_invalid_required.<locals>._FactoryNrGr&rrrpr��rKrrpr�rr)	r
rDrJrUr^rVrwrpr3s	         r�'test_registerAdapter_w_invalid_requiredz7ComponentsTests.test_registerAdapter_w_invalid_required�sk��>�	�>�	��F�|���F�|������	�	��}�}������)�T�%9�%9�8���E��	�	Grc��ddlm}ddlm}ddlm}ddlm}Gd�d|�}|d�}d}d	}Gd
�d�}	|j�}
|j�\}}|5|
j|	dg|||��ddd�|j|
jjd
||||	u�|j|
j|f||f|	|f�|jt!|�d
�|d\}
}|
\}|j|i�|jt#||��|jt#|j$|��|j|j$j&|
u�|j|j$j(|u�|j|j$j*|f�|j|j$j,|u�|j|j$j.|u�|j|j$j0|	u�y#1swY���xYw)Nrrhrrirac��eZdZy)�MComponentsTests.test_registerAdapter_w_required_containing_None.<locals>.IFooNrGr&rrrJr��rKrrJrQrc��eZdZy)�QComponentsTests.test_registerAdapter_w_required_containing_None.<locals>._FactoryNrGr&rrrpr��rKrrpr�rp)rSrD�zope.interface.interfacerrqrjrrrbrr"r]r+r-rsr(r0rur,rarrvrirrQr`)r
rDrrjrbrJrUrVrwrpr3r!rrrrxs                r�/test_registerAdapter_w_required_containing_Nonez?ComponentsTests.test_registerAdapter_w_required_containing_None�s���>�6�8�?�	�>�	��F�|������	�	��}�}����+�+�-����
�	9�� � ��D�6�D�&+�%�
!�
9�	9�	
����
�
�/�/��2�9�=�d�C�E�J�#�$�	%�����4�4�i�\�4��5N�O�"�E�*�	,�����W��q�)��1�:���b��������R� ����
�5�*�5�6����
�5�<�<�1D�E�F�������-�-��5�6�������-�-��5�6�������.�.���=�������)�)�U�2�3�������)�)�U�2�3�������,�,��8�9�%	9�	9�s�H;�;Ic���ddlm}ddlm}ddlm}ddlm}ddlm}Gd�d|�}|d�}|d	�}d
}	d}
Gd�d
�}||�Gd�d��}||�}
|j�}|j�\}}|5|j||g||
|	��ddd�|j|jjd|
||
|u�|j|j|
f||
f||	f�|jt!|�d�|d\}}|\}|j|i�|jt#||��|jt#|j$|��|j|j$j&|u�|j|j$j(|u�|j|j$j*|
f�|j|j$j,|
u�|j|j$j.|	u�|j|j$j0|u�y#1swY���xYw)Nrrhru)�
implementedByrirac��eZdZy)�NComponentsTests.test_registerAdapter_w_required_containing_class.<locals>.IFooNrGr&rrrJr��rKrrJr�rQrc��eZdZy)�RComponentsTests.test_registerAdapter_w_required_containing_class.<locals>._FactoryNrGr&rrrpr��rKrrpc��eZdZy)�RComponentsTests.test_registerAdapter_w_required_containing_class.<locals>._ContextNrGr&rr�_Contextr��rPrr�r�rp)rSrDrvr�rqrjrrrbrr"r]r+r-rsr(r0rur,rarrvrirrQr`)r
rDrvr�rjrbrJrUr^rVrwrpr��	_ctx_implr3r!rrrrxs                    r�0test_registerAdapter_w_required_containing_classz@ComponentsTests.test_registerAdapter_w_required_containing_class�s)��>�;�=�8�?�	�>�	��F�|���F�|������	�	�
�T�	�	�	�
�	�!�(�+�	��}�}����+�+�-����
�	9�� � ��H�:��&+�%�
!�
9�	9�	
����
�
�/�/��2�9�=�d�C�E�J�#�$�	%�����4�4�i�\�4��5N�O�"�E�*�	,�����W��q�)��1�:���b��������R� ����
�5�*�5�6����
�5�<�<�1D�E�F�������-�-��5�6�������-�-��5�6�������.�.���=�������)�)�U�2�3�������)�)�U�2�3�������,�,��8�9�%	9�	9�s�
I&�&I0c	���ddlm}Gd�d|�}|d�}d}d}Gd�d�}|j�}|jt|j
|t
�g|||�	�y)
Nrrhc��eZdZy)�MComponentsTests.test_registerAdapter_w_required_containing_junk.<locals>.IFooNrGr&rrrJr�
rKrrJrQrc��eZdZy)�QComponentsTests.test_registerAdapter_w_required_containing_junk.<locals>._FactoryNrGr&rrrpr�rKrrpr�)rSrDrrbrcr]rar�s        r�/test_registerAdapter_w_required_containing_junkz?ComponentsTests.test_registerAdapter_w_required_containing_junksf��>�	�>�	��F�|������	�	��}�}������)�T�%9�%9�8�f�h�Z�#'�e�%�	�	Arc���ddlm}ddlm}ddlm}Gd�d|�}|d�}|d��d}d	}G�fd
�d�}|j
�}	|j�\}
}|
5|	j||||��ddd�|j|	jjd
�|||u�|j|	j�f||f||f�|jt|�d
�|d\}}
|\}|j|
i�|jt||��|jt|j |��|j|j j"|	u�|j|j j$|u�|j|j j&�f�|j|j j(|u�|j|j j*|u�|j|j j,|u�y#1swY���xYw)Nrrhrirac��eZdZy)�GComponentsTests.test_registerAdapter_wo_explicit_required.<locals>.IFooNrGr&rrrJr�rKrrJr�rQrc���eZdZW�fZy)�KComponentsTests.test_registerAdapter_wo_explicit_required.<locals>._FactoryN�r)rHrI�__component_adapts__�r^s�rrpr�!����$(�7� rrpr�rprh)r
rDrjrbrJrUrVrwrpr3r!rrrrxr^s               @r�)test_registerAdapter_wo_explicit_requiredz9ComponentsTests.test_registerAdapter_wo_explicit_requireds����>�8�?�	�>�	��F�|���F�|������	+�	+��}�}����+�+�-����
�	-�� � ��D�u�&+�
!�
-�	-�	
����
�
�/�/��2�4�8��>�u�E�#�$�	%�����4�4�d�W�d�E�5I�J�"�E�*�	,�����W��q�)��1�:���b��������R� ����
�5�*�5�6����
�5�<�<�1D�E�F�������-�-��5�6�������-�-��5�6�������.�.���8�������)�)�U�2�3�������)�)�U�2�3�������,�,��8�9�%	-�	-�s�$H>�>Ic	�.�ddlm}Gd�d|�}|d�}|d�}d}d}d�}|j�}|j�\}	}
|	5|j	||f|||d	�
�ddd�|jt
|
�d�y#1swY�%xYw)Nrrhc��eZdZy)�;ComponentsTests.test_registerAdapter_wo_event.<locals>.IFooNrGr&rrrJr�=rKrrJr�rQrc��t��rrZrfs rr\z?ComponentsTests.test_registerAdapter_wo_event.<locals>._factoryDr]rF)rx)rSrDrr"r]r(ru)r
rDrJrUr^rVrwr\r3r!rs           r�test_registerAdapter_wo_eventz-ComponentsTests.test_registerAdapter_wo_event:s���>�	�>�	��F�|���F�|������	(��}�}����+�+�-����
�	.�� � ��D�7�D�%��',�
!�
.�	.�	
����W��q�)�	.�	.�s�B�Bc�j�|j�}|jt|jdd��y�N)r`rv)rrbrc�unregisterAdapterr;s  r�3test_unregisterAdapter_neither_factory_nor_providedzCComponentsTests.test_unregisterAdapter_neither_factory_nor_providedMs/���}�}������)�T�%;�%;�"&��	�	7rc��ddlm}Gd�d|�}|d�}|j�}|jt|j
d|d��y)Nrrhc��eZdZy)�QComponentsTests.test_unregisterAdapter_neither_factory_nor_required.<locals>.IFooNrGr&rrrJr�TrKrrJ�r`rvri)rSrDrrbrcr�r,s     r�3test_unregisterAdapter_neither_factory_nor_requiredzCComponentsTests.test_unregisterAdapter_neither_factory_nor_requiredRsJ��>�	�>�	��F�|���}�}������)�T�%;�%;�"&���	�	Frc��ddlm}Gd�d|�}|d�}|d�}Gd�d�}|j�}|j�\}}|5|j	||f|�}	ddd�|j	�y#1swY�xYw)Nrrhc��eZdZy)�9ComponentsTests.test_unregisterAdapter_miss.<locals>.IFooNrGr&rrrJr�]rKrrJr�c��eZdZy)�=ComponentsTests.test_unregisterAdapter_miss.<locals>._FactoryNrGr&rrrpr�arKrrp)rSrDrr"r�r��
r
rDrJrUr^rpr3r!rr�s
          r�test_unregisterAdapter_missz+ComponentsTests.test_unregisterAdapter_miss[s���>�	�>�	��F�|���F�|��	�	��}�}����+�+�-����
�	D��*�*�8�d�W�d�C�E�	D������	D�	D�s�B�B	c��ddlm}ddlm}ddlm}Gd�d|�}|d�}|d�}Gd�d	�}|j
�}|j||f|�|j�\}	}
|	5|j||f|�}ddd�|j�|j|jj�|j|j�|jt!|
�d
�|
d\}}
|\}|j|
i�|jt#||��|jt#|j$|��|j|j$j&|u�|j|j$j(|u�|j|j$j*|f�|j|j$j,d�|j|j$j.d�|j|j$j0|u�y#1swY���xYw)Nrrhr�rac��eZdZy)�YComponentsTests.test_unregisterAdapter_hit_w_explicit_provided_and_required.<locals>.IFooNrGr&rrrJr�nrKrrJr�c��eZdZy)�]ComponentsTests.test_unregisterAdapter_hit_w_explicit_provided_and_required.<locals>._FactoryNrGr&rrrpr�rrKrrprpro)rSrDrqr�rrrbrr]r"r�r+r�r-rsr0r(rur,rarrvrirrQr`)r
rDr�rbrJrUr^rpr3r!rr�rrrxs               r�;test_unregisterAdapter_hit_w_explicit_provided_and_requiredzKComponentsTests.test_unregisterAdapter_hit_w_explicit_provided_and_requiredjs���>�:�?�	�>�	��F�|���F�|��	�	��}�}������X��w��5��+�+�-����
�	D��*�*�8�d�W�d�C�E�	D������������0�0�1�����4�4�5�����W��q�)��1�:���b��������R� ����
�5�,�7�8����
�5�<�<�1D�E�F�������-�-��5�6�������-�-��5�6�������.�.���8�������*�*�B�/�������*�*�B�/�������,�,��8�9�!	D�	D���1I�Ic�<�ddlm}ddlm}ddlm}ddlm}Gd�d|�}|d�}|d�}||�Gd	�d
��}|j�}	|	j||f|�|j�\}
}|
5|	j||f�}ddd�|j�|jt|�d�|d\}
}|
\}|j|i�|jt||��|jt|j|��|j|jj |	u�|j|jj"|u�|j|jj$|f�|j|jj&d�|j|jj(d�|j|jj*|u�y#1swY��}xYw)
Nrrhrur�rac��eZdZy)�IComponentsTests.test_unregisterAdapter_wo_explicit_provided.<locals>.IFooNrGr&rrrJr��rKrrJr�c��eZdZy)�MComponentsTests.test_unregisterAdapter_wo_explicit_provided.<locals>._FactoryNrGr&rrrpr��rPrrprpro)rSrDrvrqr�rrrbrr]r"r�r+r(rur,rarrvrirrQr`)r
rDrvr�rbrJrUr^rpr3r!rr�rrrxs                r�+test_unregisterAdapter_wo_explicit_providedz;ComponentsTests.test_unregisterAdapter_wo_explicit_provided�s���>�;�:�?�	�>�	��F�|���F�|��	�T�	�	�	�
�	��}�}������X��w��5��+�+�-����
�	>��*�*�8�d�W�=�E�	>����������W��q�)��1�:���b��������R� ����
�5�,�7�8����
�5�<�<�1D�E�F�������-�-��5�6�������-�-��5�6�������.�.���8�������*�*�B�/�������*�*�B�/�������,�,��8�9�	>�	>���H�Hc� ��ddlm}ddlm}ddlm}Gd�d|�}|d�}|d��G�fd�d	�}|j
�}|j|�f|�|j�\}}	|5|j||�
�}
ddd�|j
�|jt|	�d�|	d\}}|\}
|j|i�|jt|
|��|jt|
j|��|j|
jj|u�|j|
jj |u�|j|
jj"�f�|j|
jj$d�|j|
jj&d�|j|
jj(|u�y#1swY��}xYw)
Nrrhr�rac��eZdZy)�IComponentsTests.test_unregisterAdapter_wo_explicit_required.<locals>.IFooNrGr&rrrJr��rKrrJr�c���eZdZW�fZy)�MComponentsTests.test_unregisterAdapter_wo_explicit_required.<locals>._FactoryNr�r�s�rrpr��r�rrp�rvrpro)rSrDrqr�rrrbrr]r"r�r+r(rur,rarrvrirrQr`)r
rDr�rbrJrUrpr3r!rr�rrrxr^s              @r�+test_unregisterAdapter_wo_explicit_requiredz;ComponentsTests.test_unregisterAdapter_wo_explicit_required�s����>�:�?�	�>�	��F�|���F�|��	+�	+��}�}������X��w��5��+�+�-����
�	D��*�*�8�d�*�C�E�	D����������W��q�)��1�:���b��������R� ����
�5�,�7�8����
�5�<�<�1D�E�F�������-�-��5�6�������-�-��5�6�������.�.���8�������*�*�B�/�������*�*�B�/�������,�,��8�9�	D�	D���4H�H
c�v�|j�}|jt|j��g�yr)rr(r��registeredAdaptersr;s  r�test_registeredAdapters_emptyz-ComponentsTests.test_registeredAdapters_empty�s+���}�}�������d�5�5�7�8�"�=rc���ddlm}ddlm}Gd�d|�}|d�}|d�}d}d}d}Gd	�d
�}	|j	�}
|
j|	|f|||�|
j|	|f|||�t
|
j�d���}|jt|�d
�|jt|d|��|j|dj|
u�|j|dj|u�|j|dj|f�|j|dj|u�|j|dj |u�|j|dj"|	u�|jt|d|��|j|dj|
u�|j|dj|u�|j|dj|f�|j|dj|u�|j|dj |u�|j|dj"|	u�y)Nrrhrac��eZdZy)�>ComponentsTests.test_registeredAdapters_notempty.<locals>.IFooNrGr&rrrJr��rKrrJrQr�r�c��eZdZy)�BComponentsTests.test_registeredAdapters_notempty.<locals>._FactoryNrGr&rrrpr��rKrrpc��|jSrrr s rr"zBComponentsTests.test_registeredAdapters_notempty.<locals>.<lambda>�s
��a�f�f�rr#r�rp)rSrDrrrbrr]r%r�r(rur+r,rrvrirrQr`)r
rDrbrJrUr^rVr�r�rpr3r&s            r� test_registeredAdapters_notemptyz0ComponentsTests.test_registeredAdapters_notempty�s��>�?�	�>�	��F�|���F�|��������	�	��}�}������X��w��f�e�D����X��w��f�e�D��T�,�,�.�4D�E������S��1�%����
�3�q�6�+>�?�@�����A����4�/�0�����A����4�/�0�����Q����4�'�2�����A����v�-�.�����A����u�,�-�����A����(�2�3����
�3�q�6�+>�?�@�����A����4�/�0�����A����4�/�0�����Q����4�'�2�����A����v�-�.�����A����u�,�-�����A����(�2�3rc��ddlm}Gd�d|�}|d�}|j�}t�}|j	|j||�du�y)Nrrhc��eZdZy)�?ComponentsTests.test_queryAdapter_miss_no_default.<locals>.IFooNrGr&rrrJr��rKrrJ�rSrDrrar+�queryAdapter)r
rDrJrUr3�_contexts      r�!test_queryAdapter_miss_no_defaultz1ComponentsTests.test_queryAdapter_miss_no_default�sJ��>�	�>�	��F�|���}�}����8������)�)�(�D�9�T�A�Brc���ddlm}Gd�d|�}|d�}|j�}t�}t�}|j	|j|||��|u�y)Nrrhc��eZdZy)�>ComponentsTests.test_queryAdapter_miss_w_default.<locals>.IFooNrGr&rrrJr��rKrrJr1r�)r
rDrJrUr3r�r3s       r� test_queryAdapter_miss_w_defaultz0ComponentsTests.test_queryAdapter_miss_w_default�sZ��>�	�>�	��F�|���}�}����8���8��������h��h��?�8�K�	Mrc�z�ddlm}ddlm}Gd�d|�}|d�}|d�}Gd�d�}||�Gd	�d
��}|�}|j�}	|	j	||f|�|	j||�}
|j
t|
|��|j
|
j|u�y)Nrrhruc��eZdZy)�3ComponentsTests.test_queryAdapter_hit.<locals>.IFooNrGr&rrrJr�rKrrJr�c��eZdZd�Zy)�7ComponentsTests.test_queryAdapter_hit.<locals>._Factoryc��||_yrrf�r
rgs  rrz@ComponentsTests.test_queryAdapter_hit.<locals>._Factory.__init__
�	��&��rN�r)rHrIrr&rrrpr�	���
'rrpc��eZdZy)�7ComponentsTests.test_queryAdapter_hit.<locals>._ContextNrGr&rrr�r�rPrr�)	rSrDrvrr]r�r+r,rg�r
rDrvrJrUr^rpr�r�r3�adapters           r�test_queryAdapter_hitz%ComponentsTests.test_queryAdapter_hits���>�;�	�>�	��F�|���F�|��	'�	'�
�T�	�	�	�
�	��:���}�}������X��w��5��#�#�H�d�3�����
�7�H�5�6�������8�3�4rc���ddlm}ddlm}ddlm}Gd�d|�}|d�}|d�}||�Gd�d	��}|�}|j�}	|j
||	j||�y)
Nrrhrur;c��eZdZy)�2ComponentsTests.test_getAdapter_miss.<locals>.IFooNrGr&rrrJr�rKrrJr�c��eZdZy)�6ComponentsTests.test_getAdapter_miss.<locals>._ContextNrGr&rrr�r�rPrr�)rSrDrvrqr<rrb�
getAdapter)
r
rDrvr<rJrUr^r�r�r3s
          r�test_getAdapter_missz$ComponentsTests.test_getAdapter_missss��>�;�B�	�>�	��F�|���F�|��	�T�	�	�	�
�	��:���}�}������.��/�/�8�T�	;rc�f�ddlm}ddlm}Gd�d|�}|d�}|d�}Gd�d�}||�Gd	�d
��}|�}|j�}	|	j	||f|�|	j||�}
|j
|
|�|j|
j|�y)Nrrhruc��eZdZy)�1ComponentsTests.test_getAdapter_hit.<locals>.IFooNrGr&rrrJr)rKrrJr�c��eZdZd�Zy)�5ComponentsTests.test_getAdapter_hit.<locals>._Factoryc��||_yrrfr�s  rrz>ComponentsTests.test_getAdapter_hit.<locals>._Factory.__init__.r�rNr�r&rrrpr-r�rrpc��eZdZy)�5ComponentsTests.test_getAdapter_hit.<locals>._ContextNrGr&rrr�r	0rPrr�)	rSrDrvrr]r�assertIsInstance�assertIsrgr�s           r�test_getAdapter_hitz#ComponentsTests.test_getAdapter_hit&s���>�;�	�>�	��F�|���F�|��	'�	'�
�T�	�	�	�
�	��:���}�}������X��w��5��/�/�(�D�1�����g�x�0��
�
�g�o�o�x�0rc���ddlm}ddlm}Gd�d|�}Gd�d|�}Gd�d	|�}||�Gd
�d��}||�Gd�d
|��}Gd�d�}Gd�d�}	|j	�}
|
j|	|f|�|
j||f|�|j
|
�|�}|
j||�}|j||	�|j|j|�t||�}
|
j|
|�}|j||�|j|j|�y)Nrrruc��eZdZy)�8ComponentsTests.test_getAdapter_hit_super.<locals>.IBaseNrGr&rr�IBaser>rKrrc��eZdZy)�;ComponentsTests.test_getAdapter_hit_super.<locals>.IDerivedNrGr&rr�IDerivedrArKrrc��eZdZy)�7ComponentsTests.test_getAdapter_hit_super.<locals>.IFooNrGr&rrrJrDrKrrJc��eZdZy)�7ComponentsTests.test_getAdapter_hit_super.<locals>.BaseNrGr&rr�BaserGrPrrc��eZdZy)�:ComponentsTests.test_getAdapter_hit_super.<locals>.DerivedNrGr&rr�DerivedrKrPrrc��eZdZd�Zy)�>ComponentsTests.test_getAdapter_hit_super.<locals>.AdapterBasec��||_yrrfr�s  rrzGComponentsTests.test_getAdapter_hit_super.<locals>.AdapterBase.__init__Pr�rNr�r&rr�AdapterBaserOr�rrc��eZdZd�Zy)�AComponentsTests.test_getAdapter_hit_super.<locals>.AdapterDerivedc��||_yrrfr�s  rrzJComponentsTests.test_getAdapter_hit_super.<locals>.AdapterDerived.__init__Tr�rNr�r&rr�AdapterDerivedr!Sr�rr#�rrrSrvrr]�_should_not_changerr
rrgr��r
rrvrrrJrrrr#r3�derivedr��super�s              �r�test_getAdapter_hit_superz)ComponentsTests.test_getAdapter_hit_super:s9���,�;�	�I�	�	�u�	�	�9�	�
�U�	�	�	�
�	�
�X�	�	�d�	�
�	�	'�	'�	'�	'��}�}������^�h�[�$�?����[�5�(�D�9�����%��)���/�/�'�4�0�����g�~�6��
�
�g�o�o�w�/��W�g�&���/�/�$��-�����g�{�3��
�
�g�o�o�w�/rc����ddlm}ddlm}Gd�d|�}Gd�d|�}Gd�d	|�}Gd
�d�}Gd�d
|�}||�Gd�d|��}||�Gd�d||��}	Gd�d�}
Gd�d�}|j	�}|j||f|�|j|
|f|�|j
|�|	�}
|j|
|�}|j||�|j|j|
�t|	|
�}|j||�}|j||
�|j|j|
�y)Nrrruc��eZdZy)�aComponentsTests.test_getAdapter_hit_super_when_parent_implements_interface_diamond.<locals>.IBaseNrGr&rrrr,jrKrrc��eZdZy)�dComponentsTests.test_getAdapter_hit_super_when_parent_implements_interface_diamond.<locals>.IDerivedNrGr&rrrr.mrKrrc��eZdZy)�`ComponentsTests.test_getAdapter_hit_super_when_parent_implements_interface_diamond.<locals>.IFooNrGr&rrrJr0prKrrJc��eZdZy)�`ComponentsTests.test_getAdapter_hit_super_when_parent_implements_interface_diamond.<locals>.BaseNrGr&rrrr2srKrrc��eZdZy)�bComponentsTests.test_getAdapter_hit_super_when_parent_implements_interface_diamond.<locals>.Child1NrGr&rr�Child1r4vrKrr5c��eZdZy)�bComponentsTests.test_getAdapter_hit_super_when_parent_implements_interface_diamond.<locals>.Child2NrGr&rr�Child2r7yrPrr8c��eZdZy)�cComponentsTests.test_getAdapter_hit_super_when_parent_implements_interface_diamond.<locals>.DerivedNrGr&rrrr:}rPrrc��eZdZd�Zy)�gComponentsTests.test_getAdapter_hit_super_when_parent_implements_interface_diamond.<locals>.AdapterBasec��||_yrrfr�s  rrzpComponentsTests.test_getAdapter_hit_super_when_parent_implements_interface_diamond.<locals>.AdapterBase.__init__�r�rNr�r&rrrr<�r�rrc��eZdZd�Zy)�jComponentsTests.test_getAdapter_hit_super_when_parent_implements_interface_diamond.<locals>.AdapterDerivedc��||_yrrfr�s  rrzsComponentsTests.test_getAdapter_hit_super_when_parent_implements_interface_diamond.<locals>.AdapterDerived.__init__�r�rNr�r&rrr#r?�r�rr#r$)r
rrvrrrJrr5r8rrr#r3r'r�r(r�s                �r�Btest_getAdapter_hit_super_when_parent_implements_interface_diamondzRComponentsTests.test_getAdapter_hit_super_when_parent_implements_interface_diamondfsS���,�;�	�I�	�	�u�	�	�9�	�	�	�	�T�	�
�U�	�	�T�	�
�	�
�X�	�	�f�f�	�
�	�	'�	'�	'�	'��}�}������^�h�[�$�?����[�5�(�D�9�����%��)���/�/�'�4�0�����g�~�6��
�
�g�o�o�w�/��W�g�&���/�/�$��-�����g�{�3��
�
�g�o�o�w�/rc�:�ddlm}ddlm}Gd�d|�}|d�}|d�}|d�}||�Gd�d	��}||�Gd
�d��}|�}	|�}
|j�}|j	|j|	|
f|�d�y)Nrrhruc��eZdZy)�9ComponentsTests.test_queryMultiAdapter_miss.<locals>.IFooNrGr&rrrJrD�rKrrJr��IBazc��eZdZy)�>ComponentsTests.test_queryMultiAdapter_miss.<locals>._Context1NrGr&rr�	_Context1rG�rPrrHc��eZdZy)�>ComponentsTests.test_queryMultiAdapter_miss.<locals>._Context2NrGr&rr�	_Context2rJ�rPrrK)rSrDrvrr(�queryMultiAdapter�r
rDrvrJrUr^�ibazrHrK�	_context1�	_context2r3s            r�test_queryMultiAdapter_missz+ComponentsTests.test_queryMultiAdapter_miss�s���>�;�	�>�	��F�|���F�|���F�|��	�T�	�	�	�
�	�	�T�	�	�	�
�	��K�	��K�	��}�}�������/�/��I�0F��M��	rc�T�ddlm}ddlm}Gd�d|�}|d�}|d�}|d�}||�Gd�d	��}||�Gd
�d��}|�}	|�}
t�}|j	�}|j|j
|	|
f||��|u�y)
Nrrhruc��eZdZy)�CComponentsTests.test_queryMultiAdapter_miss_w_default.<locals>.IFooNrGr&rrrJrT�rKrrJr�rEc��eZdZy)�HComponentsTests.test_queryMultiAdapter_miss_w_default.<locals>._Context1NrGr&rrrHrV�rPrrHc��eZdZy)�HComponentsTests.test_queryMultiAdapter_miss_w_default.<locals>._Context2NrGr&rrrKrX�rPrrKr1)rSrDrvrarr+rL)
r
rDrvrJrUr^rNrHrKrOrPr3r3s
             r�%test_queryMultiAdapter_miss_w_defaultz5ComponentsTests.test_queryMultiAdapter_miss_w_default�s���>�;�	�>�	��F�|���F�|���F�|��	�T�	�	�	�
�	�	�T�	�	�	�
�	��K�	��K�	��8���}�}�������"�"�I�y�#9�4�+3�
#�
5�8@�
A�	Brc���ddlm}ddlm}Gd�d|�}|d�}|d�}|d�}||�Gd�d	��}||�Gd
�d��}|�}	|�}
Gd�d
�}|j�}|j	|||f|�|j|	|
f|�}
|j
t|
|��|j|
j|	|
f�y)Nrrhruc��eZdZy)�8ComponentsTests.test_queryMultiAdapter_hit.<locals>.IFooNrGr&rrrJr\�rKrrJr�rEc��eZdZy)�=ComponentsTests.test_queryMultiAdapter_hit.<locals>._Context1NrGr&rrrHr^�rPrrHc��eZdZy)�=ComponentsTests.test_queryMultiAdapter_hit.<locals>._Context2NrGr&rrrKr`�rPrrKc��eZdZd�Zy)�<ComponentsTests.test_queryMultiAdapter_hit.<locals>._Factoryc��||f|_yrrf�r
�context1�context2s   rrzEComponentsTests.test_queryMultiAdapter_hit.<locals>._Factory.__init__����'��1��rNr�r&rrrprb����
2rrp)
rSrDrvrr]rLr+r,r(rg�r
rDrvrJrUr^rNrHrKrOrPrpr3r�s              r�test_queryMultiAdapter_hitz*ComponentsTests.test_queryMultiAdapter_hit�s���>�;�	�>�	��F�|���F�|���F�|��	�T�	�	�	�
�	�	�T�	�	�	�
�	��K�	��K�	�	2�	2��}�}������X��d�|�T�:��(�(�)�Y�)?��F�����
�7�H�5�6�������9�i�*@�Arc�>�ddlm}ddlm}ddlm}Gd�d|�}|d�}|d�}|d�}||�Gd	�d
��}||�Gd�d��}	|�}
|	�}|j�}|j
||j|
|f|�y)
Nrrhrur;c��eZdZy)�7ComponentsTests.test_getMultiAdapter_miss.<locals>.IFooNrGr&rrrJrm�rKrrJr�rEc��eZdZy)�<ComponentsTests.test_getMultiAdapter_miss.<locals>._Context1NrGr&rrrHro�rPrrHc��eZdZy)�<ComponentsTests.test_getMultiAdapter_miss.<locals>._Context2NrGr&rrrKrq�rPrrK)rSrDrvrqr<rrb�getMultiAdapter)
r
rDrvr<rJrUr^rNrHrKrOrPr3s
             r�test_getMultiAdapter_missz)ComponentsTests.test_getMultiAdapter_miss�s���>�;�B�	�>�	��F�|���F�|���F�|��	�T�	�	�	�
�	�	�T�	�	�	�
�	��K�	��K�	��}�}������.��.�.��I�0F��	Nrc���ddlm}ddlm}Gd�d|�}|d�}|d�}|d�}||�Gd�d	��}||�Gd
�d��}|�}	|�}
Gd�d
�}|j�}|j	|||f|�|j|	|
f|�}
|j
t|
|��|j|
j|	|
f�y)Nrrhruc��eZdZy)�6ComponentsTests.test_getMultiAdapter_hit.<locals>.IFooNrGr&rrrJrv�rKrrJr�rEc��eZdZy)�;ComponentsTests.test_getMultiAdapter_hit.<locals>._Context1NrGr&rrrHrx�rPrrHc��eZdZy)�;ComponentsTests.test_getMultiAdapter_hit.<locals>._Context2NrGr&rrrKrz�rPrrKc��eZdZd�Zy)�:ComponentsTests.test_getMultiAdapter_hit.<locals>._Factoryc��||f|_yrrfrds   rrzCComponentsTests.test_getMultiAdapter_hit.<locals>._Factory.__init__rgrNr�r&rrrpr|rhrrp)
rSrDrvrr]rrr+r,r(rgris              r�test_getMultiAdapter_hitz(ComponentsTests.test_getMultiAdapter_hit�s���>�;�	�>�	��F�|���F�|���F�|��	�T�	�	�	�
�	�	�T�	�	�	�
�	��K�	��K�	�	2�	2��}�}������X��d�|�T�:��&�&�	�9�'=�t�D�����
�7�H�5�6�������9�i�*@�Arc�v���fd�}||_||j_||jj_y)Nc�(���jd�y)NzNothing should get changed)�fail)rr
s �r�
no_changesz6ComponentsTests._should_not_change.<locals>.no_changes
s����I�I�2�3r)�changedr-�	_v_lookup)r
r3r�s`  rr%z"ComponentsTests._should_not_change	s-���	4�!��� *��
�
��*4��
�
���'rc�8��ddlm}ddlm}Gd�d|�}Gd�d|�}Gd�d	|�}||�Gd
�d��}||�Gd�d
|��}Gd�d�}Gd�d|�}	|j	�}
|
j|	||f|�|
j|||f|�|j
|
�|�}|
j||f|�}|j||	�|j|j|�|j|j|�t||�}
|
j|
|f|�}|j||�|j||	�|j|j|�|j|j|�y)Nrrruc��eZdZy)�=ComponentsTests.test_getMultiAdapter_hit_super.<locals>.IBaseNrGr&rrrr�rKrrc��eZdZy)�@ComponentsTests.test_getMultiAdapter_hit_super.<locals>.IDerivedNrGr&rrrr�rKrrc��eZdZy)�<ComponentsTests.test_getMultiAdapter_hit_super.<locals>.IFooNrGr&rrrJr�rKrrJc��eZdZy)�<ComponentsTests.test_getMultiAdapter_hit_super.<locals>.BaseNrGr&rrrr� rPrrc��eZdZy)�?ComponentsTests.test_getMultiAdapter_hit_super.<locals>.DerivedNrGr&rrrr�$rPrrc��eZdZd�Zy)�CComponentsTests.test_getMultiAdapter_hit_super.<locals>.AdapterBasec� �||_||_yr)rerfrds   rrzLComponentsTests.test_getMultiAdapter_hit_super.<locals>.AdapterBase.__init__)s�� (��
� (��
rNr�r&rrrr�(s��
)rrc��eZdZy)�FComponentsTests.test_getMultiAdapter_hit_super.<locals>.AdapterDerivedNrGr&rrr#r�-rKrr#)rrrSrvrr]r%rrr
rrerfr��assertNotIsInstancer&s              �r�test_getMultiAdapter_hit_superz.ComponentsTests.test_getMultiAdapter_hit_supers����,�;�	�I�	�	�u�	�	�9�	�
�U�	�	�	�
�	�
�X�	�	�d�	�
�	�	)�	)�
	�[�	��}�}������^�h��-A�4�H����[�5�(�*;�T�B�����%��)���&�&���'9�4�@�����g�~�6��
�
�g�&�&��0��
�
�g�&�&��0��W�g�&���&�&��g���=�����g�{�3�� � ��.�9��
�
�g�&�&��0��
�
�g�&�&��0rc�L�ddlm}ddlm}Gd�d|�}|d�}|d�}|d�}||�Gd�d	��}||�Gd
�d��}|�}	|�}
|j�}|j	t|j
|	|
f|��g�y)Nrrhruc��eZdZy)�4ComponentsTests.test_getAdapters_empty.<locals>.IFooNrGr&rrrJr�ErKrrJr�rEc��eZdZy)�9ComponentsTests.test_getAdapters_empty.<locals>._Context1NrGr&rrrHr�JrPrrHc��eZdZy)�9ComponentsTests.test_getAdapters_empty.<locals>._Context2NrGr&rrrKr�MrPrrK)rSrDrvrr(r��getAdaptersrMs            r�test_getAdapters_emptyz&ComponentsTests.test_getAdapters_emptyBs���>�;�	�>�	��F�|���F�|���F�|��	�T�	�	�	�
�	�	�T�	�	�	�
�	��K�	��K�	��}�}��������!�!�9�i�"8�$�?�@�"�	Frc��
�ddlm}ddlm}Gd�d|�}|d�}|d�}|d�}||�Gd�d	��}||�Gd
�d��}|�}	|�}
|j�}g�
�
fd�}|j	|||f|�|jt
|j|	|
f|��g�|j�
|	|
fg�y)
Nrrhruc��eZdZy)�CComponentsTests.test_getAdapters_factory_returns_None.<locals>.IFooNrGr&rrrJr�YrKrrJr�rEc��eZdZy)�HComponentsTests.test_getAdapters_factory_returns_None.<locals>._Context1NrGr&rrrHr�^rPrrHc��eZdZy)�HComponentsTests.test_getAdapters_factory_returns_None.<locals>._Context2NrGr&rrrKr�arPrrKc�,���j||f�yrr)rerf�_called_withs  �r�_side_effect_onlyzPComponentsTests.test_getAdapters_factory_returns_None.<locals>._side_effect_onlyhs�������8� 4�5�r)rSrDrvrr]r(r�r�)r
rDrvrJrUr^rNrHrKrOrPr3r�r�s             @r�%test_getAdapters_factory_returns_Nonez5ComponentsTests.test_getAdapters_factory_returns_NoneVs����>�;�	�>�	��F�|���F�|���F�|��	�T�	�	�	�
�	�	�T�	�	�	�
�	��K�	��K�	��}�}�����	�	
���.��t��d�C������!�!�9�i�"8�$�?�@�"�	F������I�(>�'?�@rc���ddlm}ddlm}Gd�d|�}|d�}|d�}|d�}||�Gd�d	��}||�Gd
�d��}|�}	|�}
Gd�d
�}Gd�d�}d}
d}|j�}|j	|||f||
��|j	|||f||��t|j
|	|
f|��}|jt|�d�|j|dd|
�|jt|dd|��|j|dd|�|jt|dd|��y)Nrrhruc��eZdZy)�8ComponentsTests.test_getAdapters_non_empty.<locals>.IFooNrGr&rrrJr�trKrrJr�rEc��eZdZy)�=ComponentsTests.test_getAdapters_non_empty.<locals>._Context1NrGr&rrrHr�yrPrrHc��eZdZy)�=ComponentsTests.test_getAdapters_non_empty.<locals>._Context2NrGr&rrrKr�|rPrrKc��eZdZd�Zy)�=ComponentsTests.test_getAdapters_non_empty.<locals>._Factory1c��||f|_yrrfrds   rrzFComponentsTests.test_getAdapters_non_empty.<locals>._Factory1.__init__�rgrNr�r&rr�	_Factory1r��rhrr�c��eZdZd�Zy)�=ComponentsTests.test_getAdapters_non_empty.<locals>._Factory2c��||f|_yrrfrds   rrzFComponentsTests.test_getAdapters_non_empty.<locals>._Factory2.__init__�rgrNr�r&rr�	_Factory2r��rhrr�r�r�rr�rp)rSrDrvrr]r%r�r(rur+r,)r
rDrvrJrUr^rNrHrKrOrPr�r�r�r�r3�founds                 r�test_getAdapters_non_emptyz*ComponentsTests.test_getAdapters_non_emptypsl��>�;�	�>�	��F�|���F�|���F�|��	�T�	�	�	�
�	�	�T�	�	�	�
�	��K�	��K�	�	2�	2�	2�	2������}�}������Y��t��d���H����Y��t��d���H��t�'�'��I�(>��E�F������U��Q�'�����q��!��f�-����
�5��8�A�;�	�:�;�����q��!��f�-����
�5��8�A�;�	�:�;rc	��ddlm}Gd�d|�}|d�}|d�}d}d}d�}|j�}|jt|j
||f|||�y)	Nrrhc��eZdZy)�NComponentsTests.test_registerSubscriptionAdapter_w_nonblank_name.<locals>.IFooNrGr&rrrJr��rKrrJr�rrQc��t��rrZrfs rr\zRComponentsTests.test_registerSubscriptionAdapter_w_nonblank_name.<locals>._factory�r]r)rSrDrrbrc�registerSubscriptionAdapter)	r
rDrJrUr^rwrVr\r3s	         r�0test_registerSubscriptionAdapter_w_nonblank_namez@ComponentsTests.test_registerSubscriptionAdapter_w_nonblank_name�se��>�	�>�	��F�|���F�|������	(��}�}������)�T�%E�%E�"�T�G�T�5�%�	Arc��ddlm}ddlm}ddlm}Gd�d|�}|d�}|d�}d}d	}d
�}	|j
�}
|j�\}}|5|
j|	|f||��ddd�|
jjd|||}
|jt|
�d�|j|
d|	u�|j|
j|f|||	|fg�|jt|�d�|d\}}|\}|j|i�|jt||��|jt|j |��|j|j j"|
u�|j|j j$|u�|j|j j&|f�|j|j j(|�|j|j j*|u�|j|j j,|	u�y#1swY���xYw)
Nrrhri��SubscriptionRegistrationc��eZdZy)�_ComponentsTests.test_registerSubscriptionAdapter_w_explicit_provided_and_required.<locals>.IFooNrGr&rrrJr��rKrrJr�rorQc��t��rrZrfs rr\zcComponentsTests.test_registerSubscriptionAdapter_w_explicit_provided_and_required.<locals>._factory�r]rrRrp�rSrDrqrjrrr�rr"r�r-rtr(rur+r1r,rarrvrirrQr`)r
rDrjr�rJrUr^�_blankrVr\r3r!rr&rrrxs                 r�Atest_registerSubscriptionAdapter_w_explicit_provided_and_requiredzQComponentsTests.test_registerSubscriptionAdapter_w_explicit_provided_and_required�s	��>�8�D�	�>�	��F�|���F�|������	(��}�}����+�+�-����
�	9��,�,�X��w��27�
-�
9�	9��m�m�(�(��+�D�1�$�7��?������S��1�%�����A��(�*�+�����9�9� �7�D�&�(�E�B�C�	E�����W��q�)��1�:���b��������R� ����
�5�*�5�6����
�5�<�<�1I�J�K�������-�-��5�6�������-�-��5�6�������.�.���8�������*�*�F�3�������)�)�U�2�3�������,�,��8�9�'	9�	9�s�I�Ic���ddlm}ddlm}ddlm}ddlm}Gd�d|�}|d�}|d�}d	}d
}	||�Gd�d��}
|j�}|j�\}}
|5|j|
|f|�
�ddd�|jjd|||	}|jt|�d�|j|d|
u�|j|j|f||	|
|fg�|jt|
�d�|
d\}}|\}|j|i�|jt!||��|jt!|j"|��|j|j"j$|u�|j|j"j&|u�|j|j"j(|f�|j|j"j*|	�|j|j"j,|u�|j|j"j.|
u�y#1swY���xYw)Nrrhrurir�c��eZdZy)�SComponentsTests.test_registerSubscriptionAdapter_wo_explicit_provided.<locals>.IFooNrGr&rrrJr��rKrrJr�rQroc��eZdZy)�WComponentsTests.test_registerSubscriptionAdapter_wo_explicit_provided.<locals>._FactoryNrGr&rrrpr��rPrrprRrp)rSrDrvrqrjrrr�rr"r�r-rtr(rur+r1r,rarrvrirrQr`)r
rDrvrjr�rJrUr^rVr�rpr3r!rr&rrrxs                  r�5test_registerSubscriptionAdapter_wo_explicit_providedzEComponentsTests.test_registerSubscriptionAdapter_wo_explicit_provided�s ��>�;�8�D�	�>�	��F�|���F�|������	�T�	�	�	�
�	��}�}����+�+�-����
�	L��,�,�X��w�U�,�K�	L��m�m�(�(��+�D�1�$�7��?������S��1�%�����A��(�*�+�����9�9� �7�D�&�(�E�B�C�	E�����W��q�)��1�:���b��������R� ����
�5�*�5�6����
�5�<�<�1I�J�K�������-�-��5�6�������-�-��5�6�������.�.���8�������*�*�F�3�������)�)�U�2�3�������,�,��8�9�%	L�	L�s�2I)�)I3c����ddlm}ddlm}ddlm}Gd�d|�}|d�}|d��d}d	}G�fd
�d�}|j
�}	|j�\}
}|
5|	j|||��ddd�|	jjd
�||}|jt|�d
�|j|d|u�|j|	j�f||||fg�|jt|�d
�|d\}
}|
\}|j|i�|jt||��|jt|j |��|j|j j"|	u�|j|j j$|u�|j|j j&�f�|j|j j(|�|j|j j*|u�|j|j j,|u�y#1swY���xYw)Nrrhrir�c��eZdZy)�SComponentsTests.test_registerSubscriptionAdapter_wo_explicit_required.<locals>.IFooNrGr&rrrJr��rKrrJr�rQroc���eZdZW�fZy)�WComponentsTests.test_registerSubscriptionAdapter_wo_explicit_required.<locals>._FactoryNr�r�s�rrpr��r�rrp)rvrQrpr�)r
rDrjr�rJrUrVr�rpr3r!rr&rrrxr^s                @r�5test_registerSubscriptionAdapter_wo_explicit_requiredzEComponentsTests.test_registerSubscriptionAdapter_wo_explicit_required�s
���>�8�D�	�>�	��F�|���F�|������	+�	+��}�}����+�+�-����
�	9��,�,��t�%�
-�
9�	9��m�m�(�(��+�D�1�$�7��?������S��1�%�����A��(�*�+�����9�9� �7�D�&�(�E�B�C�	E�����W��q�)��1�:���b��������R� ����
�5�*�5�6����
�5�<�<�1I�J�K�������-�-��5�6�������-�-��5�6�������.�.���8�������*�*�F�3�������)�)�U�2�3�������,�,��8�9�'	9�	9�s�$I�I$c�,�ddlm}Gd�d|�}|d�}|d�}d}d}d�}|j�}|j�\}	}
|	5|j	||f||d	�
�ddd�|jt
|
�d�y#1swY�%xYw)Nrrhc��eZdZy)�GComponentsTests.test_registerSubscriptionAdapter_wo_event.<locals>.IFooNrGr&rrrJr�rKrrJr�rorQc��t��rrZrfs rr\zKComponentsTests.test_registerSubscriptionAdapter_wo_event.<locals>._factoryr]rF�rQrx)rSrDrr"r�r(ru)r
rDrJrUr^r�rVr\r3r!rs           r�)test_registerSubscriptionAdapter_wo_eventz9ComponentsTests.test_registerSubscriptionAdapter_wo_events���>�	�>�	��F�|���F�|������	(��}�}����+�+�-����
�	F��,�,�X��w��27�u�
-�
F�	F�	
����W��q�)�	F�	F�s�B
�
Bc�v�|j�}|jt|j��g�yr)rr(r��registeredSubscriptionAdaptersr;s  r�)test_registeredSubscriptionAdapters_emptyz9ComponentsTests.test_registeredSubscriptionAdapters_empty's+���}�}�������d�A�A�C�D�b�Irc���ddlm}ddlm}Gd�d|�}|d�}|d�}d}d}Gd�d	�}|j	�}	|	j||f||�
�|	j||f||�
�t
|	j��}
|jt|
�d�|jt|
d|��|j|
dj|	u�|j|
dj|u�|j|
dj|f�|j|
dj|�|j|
dj |u�|j|
dj"|u�|jt|
d|��|j|
dj|	u�|j|
dj|u�|j|
dj|f�|j|
dj|�|j|
dj |u�|j|
dj"|u�y)
Nrrhr�c��eZdZy)�JComponentsTests.test_registeredSubscriptionAdapters_notempty.<locals>.IFooNrGr&rrrJr�/rKrrJrQroc��eZdZy)�NComponentsTests.test_registeredSubscriptionAdapters_notempty.<locals>._FactoryNrGr&rrrpr�5rKrrprRr�rp)rSrDrrr�rr�r�r�r(rur+r,rrvrirrQr`)r
rDr�rJrUr^rVr�rpr3r&s           r�,test_registeredSubscriptionAdapters_notemptyz<ComponentsTests.test_registeredSubscriptionAdapters_notempty+s���>�D�	�>�	��F�|���F�|������	�	��}�}����(�(��D�7�D�u�(�M��(�(��D�7�D�u�(�M��4�6�6�8�9������S��1�%����
�3�q�6�+C�D�E�����A����4�/�0�����A����4�/�0�����Q����4�'�2�����Q����f�-�����A����u�,�-�����A����(�2�3����
�3�q�6�+C�D�E�����A����4�/�0�����A����4�/�0�����Q����4�'�2�����Q����f�-�����A����u�,�-�����A����(�2�3rc��ddlm}Gd�d|�}|d�}|d�}d}|j�}|jt|j
|||��y)Nrrhc��eZdZy)�PComponentsTests.test_unregisterSubscriptionAdapter_w_nonblank_name.<locals>.IFooNrGr&rrrJr�OrKrrJr��nonblank)rirvr�rSrDrrbrc�unregisterSubscriptionAdapter)r
rDrJrUr^�	_nonblankr3s       r�2test_unregisterSubscriptionAdapter_w_nonblank_namezBComponentsTests.test_unregisterSubscriptionAdapter_w_nonblank_nameLsX��>�	�>�	��F�|���F�|���	��}�}������)�T�%G�%G�#'�$�Y�	�	Hrc�j�|j�}|jt|jdd��yr�)rrbrcr�r;s  r�?test_unregisterSubscriptionAdapter_neither_factory_nor_providedzOComponentsTests.test_unregisterSubscriptionAdapter_neither_factory_nor_providedXs/���}�}������)�T�%G�%G�"&��	�	7rc��ddlm}Gd�d|�}|d�}|j�}|jt|j
d|d��y)Nrrhc��eZdZy)�]ComponentsTests.test_unregisterSubscriptionAdapter_neither_factory_nor_required.<locals>.IFooNrGr&rrrJr�_rKrrJr�r�r,s     r�?test_unregisterSubscriptionAdapter_neither_factory_nor_requiredzOComponentsTests.test_unregisterSubscriptionAdapter_neither_factory_nor_required]sJ��>�	�>�	��F�|���}�}������)�T�%G�%G�"&���	�	Frc�:�ddlm}Gd�d|�}|d�}|d�}Gd�d�}|j�}|j�\}}|5|j	||f|�}	ddd�|j	�|j|�y#1swY�,xYw)Nrrhc��eZdZy)�EComponentsTests.test_unregisterSubscriptionAdapter_miss.<locals>.IFooNrGr&rrrJr�hrKrrJr�c��eZdZy)�IComponentsTests.test_unregisterSubscriptionAdapter_miss.<locals>._FactoryNrGr&rrrpr�lrKrrp)rSrDrr"r�r�r�s
          r�'test_unregisterSubscriptionAdapter_missz7ComponentsTests.test_unregisterSubscriptionAdapter_missfs���>�	�>�	��F�|���F�|��	�	��}�}����+�+�-����
�	P��6�6�x�$��$�O�E�	P����������!�	P�	P�s�B�Bc��ddlm}ddlm}ddlm}Gd�d|�}|d�}|d�}Gd�d	�}|j
�}|j||f|�|j�\}	}
|	5|jd|f|�}ddd�|j�|j|jj�|j|j�|jt!|
�d
�|
d\}}
|\}|j|
i�|jt#||��|jt#|j$|��|j|j$j&|u�|j|j$j(|u�|j|j$j*|f�|j|j$j,d�|j|j$j.d�|j|j$j0du�y#1swY���xYw)Nrrhr�r�c��eZdZy)�OComponentsTests.test_unregisterSubscriptionAdapter_hit_wo_factory.<locals>.IFooNrGr&rrrJr�zrKrrJr�c��eZdZy)�SComponentsTests.test_unregisterSubscriptionAdapter_hit_wo_factory.<locals>._FactoryNrGr&rrrpr�~rKrrprpro�rSrDrqr�rrr�rr�r"r�r+r�r-rtr1r(rur,rarrvrirrQr`�r
rDr�r�rJrUr^rpr3r!rr�rrrxs               r�1test_unregisterSubscriptionAdapter_hit_wo_factoryzAComponentsTests.test_unregisterSubscriptionAdapter_hit_wo_factoryvs���>�:�D�	�>�	��F�|���F�|��	�	��}�}����(�(��D�7�D�A��+�+�-����
�	L��6�6�t�d�W�d�K�E�	L������������3�3�4�����9�9�:�����W��q�)��1�:���b��������R� ����
�5�,�7�8����
�5�<�<�1I�J�K�������-�-��5�6�������-�-��5�6�������.�.���8�������*�*�B�/�������*�*�B�/�������,�,��4�5�!	L�	L�r�c��ddlm}ddlm}ddlm}Gd�d|�}|d�}|d�}Gd�d	�}|j
�}|j||f|�|j�\}	}
|	5|j||f|�}ddd�|j�|j|jj�|j|j�|jt!|
�d
�|
d\}}
|\}|j|
i�|jt#||��|jt#|j$|��|j|j$j&|u�|j|j$j(|u�|j|j$j*|f�|j|j$j,d�|j|j$j.d�|j|j$j0|u�y#1swY���xYw)Nrrhr�r�c��eZdZy)�NComponentsTests.test_unregisterSubscriptionAdapter_hit_w_factory.<locals>.IFooNrGr&rrrJr�rKrrJr�c��eZdZy)�RComponentsTests.test_unregisterSubscriptionAdapter_hit_w_factory.<locals>._FactoryNrGr&rrrpr�rKrrprpror�rs               r�0test_unregisterSubscriptionAdapter_hit_w_factoryz@ComponentsTests.test_unregisterSubscriptionAdapter_hit_w_factory�s���>�:�D�	�>�	��F�|���F�|��	�	��}�}����(�(��D�7�D�A��+�+�-����
�	P��6�6�x�$��$�O�E�	P������������3�3�4�����9�9�:�����W��q�)��1�:���b��������R� ����
�5�,�7�8����
�5�<�<�1I�J�K�������-�-��5�6�������-�-��5�6�������.�.���8�������*�*�B�/�������*�*�B�/�������,�,��8�9�!	P�	P�r�c�<�ddlm}ddlm}ddlm}ddlm}Gd�d|�}|d�}|d�}||�Gd	�d
��}|j�}	|	j||f|�|j�\}
}|
5|	j||f�}ddd�|j�|jt|�d�|d\}
}|
\}|j|i�|jt||��|jt|j|��|j|jj |	u�|j|jj"|u�|j|jj$|f�|j|jj&d�|j|jj(d�|j|jj*|u�y#1swY��}xYw)
Nrrhrur�r�c��eZdZy)�UComponentsTests.test_unregisterSubscriptionAdapter_wo_explicit_provided.<locals>.IFooNrGr&rrrJr
�rKrrJr�c��eZdZy)�YComponentsTests.test_unregisterSubscriptionAdapter_wo_explicit_provided.<locals>._FactoryNrGr&rrrpr�rPrrprpro)rSrDrvrqr�rrr�rr�r"r�r+r(rur,rarrvrirrQr`)r
rDrvr�r�rJrUr^rpr3r!rr�rrrxs                r�7test_unregisterSubscriptionAdapter_wo_explicit_providedzGComponentsTests.test_unregisterSubscriptionAdapter_wo_explicit_provided�s���>�;�:�D�	�>�	��F�|���F�|��	�T�	�	�	�
�	��}�}����(�(��D�7�D�A��+�+�-����
�	J��6�6�x�$��I�E�	J����������W��q�)��1�:���b��������R� ����
�5�,�7�8����
�5�<�<�1I�J�K�������-�-��5�6�������-�-��5�6�������.�.���8�������*�*�B�/�������*�*�B�/�������,�,��8�9�	J�	J�r�c� ��ddlm}ddlm}ddlm}Gd�d|�}|d�}|d��G�fd�d	�}|j
�}|j|�f|�|j�\}}	|5|j||�
�}
ddd�|j
�|jt|	�d�|	d\}}|\}
|j|i�|jt|
|��|jt|
j|��|j|
jj|u�|j|
jj |u�|j|
jj"�f�|j|
jj$d�|j|
jj&d�|j|
jj(|u�y#1swY��}xYw)
Nrrhr�r�c��eZdZy)�UComponentsTests.test_unregisterSubscriptionAdapter_wo_explicit_required.<locals>.IFooNrGr&rrrJr�rKrrJr�c���eZdZW�fZy)�YComponentsTests.test_unregisterSubscriptionAdapter_wo_explicit_required.<locals>._FactoryNr�r�s�rrpr�r�rrpr�rpro)rSrDrqr�rrr�rr�r"r�r+r(rur,rarrvrirrQr`)r
rDr�r�rJrUrpr3r!rr�rrrxr^s              @r�7test_unregisterSubscriptionAdapter_wo_explicit_requiredzGComponentsTests.test_unregisterSubscriptionAdapter_wo_explicit_required�s����>�:�D�	�>�	��F�|���F�|��	+�	+��}�}����(�(��D�7�D�A��+�+�-����
�	P��6�6�x�$�6�O�E�	P����������W��q�)��1�:���b��������R� ����
�5�,�7�8����
�5�<�<�1I�J�K�������-�-��5�6�������-�-��5�6�������.�.���8�������*�*�B�/�������*�*�B�/�������,�,��8�9�	P�	P�r�c��ddlm}ddlm}Gd�d|�}|d�}|d�}|j�}||�Gd�d��}|�}|j	t|j
|f|��g�y)	Nrrhruc��eZdZy)�4ComponentsTests.test_subscribers_empty.<locals>.IFooNrGr&rrrJr�rKrrJr�c��eZdZy)�3ComponentsTests.test_subscribers_empty.<locals>.BarNrGr&rr�Barr�rPrr)rSrDrvrr(r��subscribers)	r
rDrvrJrUr^r3r�bars	         r�test_subscribers_emptyz&ComponentsTests.test_subscribers_empty�sx��>�;�	�>�	��F�|���F�|���}�}���	�T�	�	�	�
�	��e������d�.�.��v�t�<�=�r�Brc���ddlm}ddlm}Gd�d|�}|d�}|d��G�fd�d�}Gd	�d
|�}|j�}|j	|�f|�|j	|�f|�|��Gd�d��}|�}	|j|	f|�}
d
�}t
|
|��}
|jt|
�d�|jt|
d|��|jt|
d|��y)Nrrhruc��eZdZy)�8ComponentsTests.test_subscribers_non_empty.<locals>.IFooNrGr&rrrJrrKrrJr�c���eZdZW�fZd�Zy)�<ComponentsTests.test_subscribers_non_empty.<locals>._Factoryc��||_yr)r�r�s  rrzEComponentsTests.test_subscribers_non_empty.<locals>._Factory.__init__s	�� '��
rN)r)rHrIr�rr�s�rrpr!	s���$(�7� �
(rrpc��eZdZy)�<ComponentsTests.test_subscribers_non_empty.<locals>._DerivedNrGr&rr�_Derivedr$
rKrr%c��eZdZy)�7ComponentsTests.test_subscribers_non_empty.<locals>.BarNrGr&rrrr'rPrrc�.�|jjSr)r�r)��xs r�
_klassnamez>ComponentsTests.test_subscribers_non_empty.<locals>._klassnames���;�;�'�'�'rr#r�rp)rSrDrvrr�rr%r(rur+r,)
r
rDrvrJrUrpr%r3rrrr+r^s
            @r�test_subscribers_non_emptyz*ComponentsTests.test_subscribers_non_emptys����>�;�	�>�	��F�|���F�|��	(�	(�	�x�	��}�}����(�(��D�7�D�A��(�(��D�7�D�A�	�T�	�	�	�
�	��e���&�&��v�t�4��	(��[�j�9������[�)�1�-����
�;�q�>�8�<�=����
�;�q�>�8�<�=rc��ddlm}Gd�d|�}|d�}d}|j�}d�}|jt|j
|||��y)Nrrhc��eZdZy)�BComponentsTests.test_registerHandler_w_nonblank_name.<locals>.IFooNrGr&rrrJr/!rKrrJr�c��t��rrZrfs rr\zFComponentsTests.test_registerHandler_w_nonblank_name.<locals>._factory&r]r�rir)rSrDrrbrc�registerHandler)r
rDrJrUr�r3r\s       r�$test_registerHandler_w_nonblank_namez4ComponentsTests.test_registerHandler_w_nonblank_namesU��>�	�>�	��F�|���	��}�}���	(�	
���)�T�%9�%9�8�#'�i�	�	9rc�\�ddlm}ddlm}ddlm}Gd�d|�}|d�}d}d}d	�}|j
�}	|j�\}
}|
5|	j||f|�
�ddd�|	jjd|d|}|jt|�d�|j|d|u�|j|	j|f|||fg�|jt|�d�|d\}
}|
\}|j|i�|jt||��|jt|j |��|j|j j"|	u�|j|j j$|f�|j|j j&|�|j|j j(|u�|j|j j*|u�y#1swY���xYw)Nrrhri��HandlerRegistrationc��eZdZy)�FComponentsTests.test_registerHandler_w_explicit_required.<locals>.IFooNrGr&rrrJr81rKrrJrorQc��t��rrZrfs rr\zJComponentsTests.test_registerHandler_w_explicit_required.<locals>._factory6r]rrRrp)rSrDrqrjrrr6rr"r2r-rtr(rur+r2r,rarrirrQr`)r
rDrjr6rJrUr�rVr\r3r!rr&rrrxs                r�(test_registerHandler_w_explicit_requiredz8ComponentsTests.test_registerHandler_w_explicit_required,s���>�8�?�	�>�	��F�|������	(��}�}����+�+�-����
�	@�� � ��D�7�� �?�	@��m�m�(�(��+�D�1�$�7��?������S��1�%�����A��(�*�+�����4�4� �7�F�H�e�<�=�	?�����W��q�)��1�:���b��������R� ����
�5�*�5�6����
�5�<�<�1D�E�F�������-�-��5�6�������.�.���8�������*�*�F�3�������)�)�U�2�3�������,�,��8�9�#	@�	@�s�H!�!H+c��
�ddlm}Gd�d|�}|d��
d}d}G�
fd�d�}|j�}|j�\}}|5|j	||d	�
�ddd�|j
jd�
d|}	|jt|	�d�|j|	d|u�|j|j�
f|||fg�|jt|�d�y#1swY��xYw)Nrrhc��eZdZy)�PComponentsTests.test_registerHandler_wo_explicit_required_no_event.<locals>.IFooNrGr&rrrJr=QrKrrJrQroc���eZdZW�fZy)�TComponentsTests.test_registerHandler_wo_explicit_required_no_event.<locals>._FactoryNr��rUs�rrpr?Vs���$(�7� �rrpFr�rp)rSrDrr"r2r-rtr(rur+r2)r
rDrJrVr�rpr3r!rr&rUs          @r�2test_registerHandler_wo_explicit_required_no_eventzBComponentsTests.test_registerHandler_wo_explicit_required_no_eventNs���>�	�>�	��F�|������	�	��}�}����+�+�-����
�	D�� � ���U� �C�	D��m�m�(�(��+�D�1�$�7��?������S��1�%�����A��(�*�+�����4�4� �7�F�H�e�<�=�	?�����W��q�)�	D�	D�s�C>�>Dc�t�|j�}|jt|j���yr)rr�r��registeredHandlersr;s  r�test_registeredHandlers_emptyz-ComponentsTests.test_registeredHandlers_emptyes)���}�}�������d�5�5�7�8�9rc��ddlm}ddlm}Gd�d|�}|d�}d�}d�}|j	�}|j||f�|j||f�d�}t
|j�|�	�}	|jt|	�d
�|jt|	d|��|j|	dj|f�|j|	djd�|j|	dj|�|j|	djd�|jt|	d|��|j|	dj|f�|j|	djd�|j|	dj|�|j|	djd�y)
Nrrhr5c��eZdZy)�?ComponentsTests.test_registeredHandlers_non_empty.<locals>.IFooNrGr&rrrJrGlrKrrJc��t��rrZrfs r�	_factory1zDComponentsTests.test_registeredHandlers_non_empty.<locals>._factory1or]rc��t��rrZrfs r�	_factory2zDComponentsTests.test_registeredHandlers_non_empty.<locals>._factory2qr]rc�B�|jjjSr)r`�__code__�co_namer)s r�
_factory_namezHComponentsTests.test_registeredHandlers_non_empty.<locals>._factory_namevs���9�9�%�%�-�-�-rr#r�rorp)rSrDrrr6rr2r%rCr(rur+r,rirr`rQ)
r
rDr6rJrUrIrKr3rOrs
          r�!test_registeredHandlers_non_emptyz1ComponentsTests.test_registeredHandlers_non_emptyis���>�?�	�>�	��F�|��	(�	(��}�}������Y���0����Y���0�	.��T�4�4�6�M�J������[�)�1�-����
�;�q�>�3F�G�H�����Q��0�0�4�'�:�����Q��,�,�b�1�����Q��/�/��;�����Q��,�,�b�1����
�;�q�>�3F�G�H�����Q��0�0�4�'�:�����Q��,�,�b�1�����Q��/�/��;�����Q��,�,�b�1rc��ddlm}Gd�d|�}|d�}d}|j�}|jt|j
|f|��y)Nrrhc��eZdZy)�DComponentsTests.test_unregisterHandler_w_nonblank_name.<locals>.IFooNrGr&rrrJrS�rKrrJr�r1)rSrDrrbrc�unregisterHandler)r
rDrJrUr�r3s      r�&test_unregisterHandler_w_nonblank_namez6ComponentsTests.test_unregisterHandler_w_nonblank_name�sN��>�	�>�	��F�|���	��}�}������)�T�%;�%;�$(�7��	�	<rc�d�|j�}|jt|j�yr)rrbrcrTr;s  r�3test_unregisterHandler_neither_factory_nor_requiredzCComponentsTests.test_unregisterHandler_neither_factory_nor_required�s#���}�}������)�T�%;�%;�<rc��ddlm}Gd�d|�}|d�}|j�}|j|f��}|j	|�y)Nrrhc��eZdZy)�9ComponentsTests.test_unregisterHandler_miss.<locals>.IFooNrGr&rrrJrZ�rKrrJ�ri)rSrDrrTr�)r
rDrJrUr3r�s      r�test_unregisterHandler_missz+ComponentsTests.test_unregisterHandler_miss�sH��>�	�>�	��F�|���}�}����&�&���&�8������rc��ddlm}ddlm}ddlm}Gd�d|�}|d�}|j
�}d�}|j
�}|j||f�|j�\}}	|5|j||f�}
ddd�|j
�|jt|	�d�|	d\}}|\}
|j|i�|jt|
|��|jt|
j|��|j|
jj|u�|j|
jj |f�|j|
jj"d	�|j|
jj$|u�y#1swY��0xYw)
Nrrhr�r5c��eZdZy)�XComponentsTests.test_unregisterHandler_hit_w_factory_and_explicit_provided.<locals>.IFooNrGr&rrrJr_�rKrrJc��t��rrZrfs rr\z\ComponentsTests.test_unregisterHandler_hit_w_factory_and_explicit_provided.<locals>._factory�r]rrpro�rSrDrqr�rrr6rr2r"rTr+r(rur,rarrirr`�r
rDr�r6rJrUr3r\r!rr�rrrxs              r�:test_unregisterHandler_hit_w_factory_and_explicit_providedzJComponentsTests.test_unregisterHandler_hit_w_factory_and_explicit_provided�sg��>�:�?�	�>�	��F�|���}�}���	(��}�}������X��w�/��+�+�-����
�	>��*�*�8�d�W�=�E�	>����������W��q�)��1�:���b��������R� ����
�5�,�7�8����
�5�<�<�1D�E�F�������-�-��5�6�������.�.���8�������*�*�B�/�������,�,��8�9�	>�	>���1F3�3F=c��ddlm}ddlm}ddlm}Gd�d|�}|d�}|j
�}d�}|j
�}|j||f�|j�\}}	|5|j|f��}
ddd�|j
�|jt|	�d	�|	d\}}|\}
|j|i�|jt|
|��|jt|
j|��|j|
jj|u�|j|
jj |f�|j|
jj"d
�|j|
jj$du�y#1swY��0xYw)Nrrhr�r5c��eZdZy)�QComponentsTests.test_unregisterHandler_hit_w_only_explicit_provided.<locals>.IFooNrGr&rrrJrg�rKrrJc��t��rrZrfs rr\zUComponentsTests.test_unregisterHandler_hit_w_only_explicit_provided.<locals>._factory�r]rr[rprorarbs              r�3test_unregisterHandler_hit_w_only_explicit_providedzCComponentsTests.test_unregisterHandler_hit_w_only_explicit_provided�sh��>�:�?�	�>�	��F�|���}�}���	(��}�}������X��w�/��+�+�-����
�	=��*�*�T�G�*�<�E�	=����������W��q�)��1�:���b��������R� ����
�5�,�7�8����
�5�<�<�1D�E�F�������-�-��5�6�������.�.���8�������*�*�B�/�������,�,��4�5�	=�	=�rdc��
�ddlm}ddlm}ddlm}Gd�d|�}|d��
G�
fd�d�}|j
�}|j|�|j�\}}|5|j|�}	ddd�|j	�|jt|�d	�|d\}
}|
\}|j|i�|jt||��|jt|j|��|j|jj|u�|j|jj �
f�|j|jj"d
�|j|jj$d
�|j|jj&|u�y#1swY��VxYw)Nrrhr�r5c��eZdZy)�IComponentsTests.test_unregisterHandler_wo_explicit_required.<locals>.IFooNrGr&rrrJrl�rKrrJc���eZdZW�fZy)�MComponentsTests.test_unregisterHandler_wo_explicit_required.<locals>._FactoryNr�r@s�rrprn�r�rrprpro)rSrDrqr�rrr6rr2r"rTr+r(rur,rarrirrQr`)r
rDr�r6rJrpr3r!rr�rrrxrUs             @r�+test_unregisterHandler_wo_explicit_requiredz;ComponentsTests.test_unregisterHandler_wo_explicit_required�sv���>�:�?�	�>�	��F�|��	+�	+��}�}������X�&��+�+�-����
�	5��*�*�8�4�E�	5����������W��q�)��1�:���b��������R� ����
�5�,�7�8����
�5�<�<�1D�E�F�������-�-��5�6�������.�.���8�������*�*�B�/�������*�*�B�/�������,�,��8�9�	5�	5�s�)G�Gc��ddlm}ddlm}Gd�d|�}|d�}|j�}||�Gd�d��}|�}|j	|f�y)Nrrhruc��eZdZy)�/ComponentsTests.test_handle_empty.<locals>.IFooNrGr&rrrJrr�rKrrJc��eZdZy)�.ComponentsTests.test_handle_empty.<locals>.BarNrGr&rrrrt�rPrr)rSrDrvr�handle)r
rDrvrJrUr3rrs        r�test_handle_emptyz!ComponentsTests.test_handle_empty�sY��>�;�	�>�	��F�|���}�}���	�T�	�	�	�
�	��e�����S�F�rc�t�
��ddlm}ddlm}Gd�d|�}|d�}g�
�
fd�}g��fd�}|j�}|j	||f�|j	||f�||�Gd�d	��}|�}	|j|	�|j
�
|	g�|j
�|	g�y)
Nrrhruc��eZdZy)�3ComponentsTests.test_handle_non_empty.<locals>.IFooNrGr&rrrJry�rKrrJc�(���j|�yrr)rg�	_called_1s �r�
_factory_1z9ComponentsTests.test_handle_non_empty.<locals>._factory_1	����� � ��)rc�(���j|�yrr)rg�	_called_2s �r�
_factory_2z9ComponentsTests.test_handle_non_empty.<locals>._factory_2	r}rc��eZdZy)�2ComponentsTests.test_handle_non_empty.<locals>.BarNrGr&rrrr�	rPrr)rSrDrvrr2rur()r
rDrvrJrUr|r�r3rrr{rs          @@r�test_handle_non_emptyz%ComponentsTests.test_handle_non_empty�s����>�;�	�>�	��F�|���	�	*��	�	*��}�}������Z�$��1����Z�$��1�	�T�	�	�	�
�	��e�����C������S�E�*�����S�E�*rc��Gd�dt�}|j�}t�}|r|n	t�}|j||��|j||d��|j	t|jj�d�|j	|jj|d|r|fn||fiig�|j	|jj||rdnd	i�|j||��}|j|�|j||d��}|j|�|j	|jji�|j	t|jj�d
�y)Nc��eZdZy)�QComponentsTests.test_register_unregister_identical_objects_provided.<locals>.IFooNrGr&rrrJr�	rKrrJr�rr�rpror��r)rrrarTr(rur.rt�	_providedr�r+)r
�	identicalrJr3�first�second�ress       r�3test_register_unregister_identical_objects_providedzCComponentsTests.test_register_unregister_identical_objects_provided	sU��	�9�	��}�}������#��������U�T��2����V�d���?�����T�^�^�8�8�9�1�=�������4�4��2�I��y�E�6�?�C�8
�7�	�	
������1�1��y�!�a�4
�	��$�$�U�T�$�:��������$�$�V�d��$�G�������������1�1�2�6�����T�^�^�8�8�9�1�=rc�(�|jd��y)NF)r�)r�rs r�2test_register_unregister_nonequal_objects_providedzBComponentsTests.test_register_unregister_nonequal_objects_provided/	s���@�@�5�@�Qrc��Gd�dt�}Gd�d�}|j�}td�D]*}|j|�|dj	|����,|j
j}|j
j}|jt|�d�|jt|d	�d�|jt|d	|�d�|j
j}|jt|�d�|jt|d	�d�|jt|d	|�d�|jt|d	|d
�d�t|��x}|j
_|ji�ix}	|d	|<td�D]$}
tt|
��}
|d	||
|	|
<�&|j||�t|��x}|j
_
|ji�ix}	|d	|<d|	d
<td
d�D]/}
tt|
��}
|d	||
}|	d
xx|fz
cc<�1|j�}
|j|j
j|�|j|
ddddd��|jd��}|j|j
j|dz�|j|
|�|j||�|jt|d	|d
�t|d	|d
��|d	|d
D]}|j!||d	|d
��|j�}|j|dd	dd	d��|jd��}|j||�|j|j
j|dz�y)Nc��eZdZdZy)�GComponentsTests.test_rebuildUtilityRegistryFromLocalCache.<locals>.IFoo�Does nothingN�r)rHrI�__doc__r&rrrJr�3	���rrJc��eZdZdZy)�YComponentsTests.test_rebuildUtilityRegistryFromLocalCache.<locals>.UtilityImplementingFoor�Nr�r&rr�UtilityImplementingFoor�6	r�rr��z{}rrprro�
r&�����)�did_not_register�needed_registered�did_not_subscribe�needed_subscribedT)�rebuild)rr�rangerT�formatr.�_generationrsr(rurt�typer�str�assertNotEqual�$rebuildUtilityRegistryFromLocalCache�assertIn)r
rJr��comps�i�orig_generation�
orig_adapters�orig_subscribers�new_adapters�dr�new_subscribersr3�rebuild_results_preflight�rebuild_results�orig_subscriber�preflight_after�
rebuild_afters                  r�)test_rebuildUtilityRegistryFromLocalCachez9ComponentsTests.test_rebuildUtilityRegistryFromLocalCache2	s���	�9�	�	�	��
�
����r��	W�A��!�!�"8�":�D�t�{�{�ST�~�!�V�	W� �/�/�5�5�����1�1�
�����]�+�Q�/�����]�1�-�.��2�����]�1�-�d�3�4�b�9� �?�?�7�7������-�.��2�����-�a�0�1�1�5�����-�a�0��6�7��;�����-�a�0��6�r�:�;�R�@�4G�4�
�3F�3H�H��u���0����B��$&�&��L��O�D�!��"�I�	3�D��s�4�y�>�D�#�A�&�t�,�T�2�A�d�G�	3�	
���M�<�8�9O��>N�9O�9Q�Q��%�/�/�6����r�"�')�)��O�A��t�$���"���!�R�L�	�D��s�4�y�>�D� ��#�D�)�$�/�D�
�b�E�d�W��E�	�%*�$N�$N�$P�!�������4�4�o�F����2� "�!#�!"�!#�5
�	� �D�D�T�D�R��	
������4�4�o��6I�J����2�O�D�����}�5�������"�4�(��,�-�� ��#�D�)�"�-�.�	0� 0��2�4�8��<�	I�O��M�M�/�?�1�+=�d�+C�B�+G�H�	I� �D�D�F������ "�!"�!#�!"�+
�	��B�B�4�B�P�
������8�������4�4�o��6I�Jr)�test)T)vr)rHrIrrr"r4r7r<r@rWrfryr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrr
rrrrr'r-r4r9r@rDrIrNrSrWr_rjrsr{r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrr)rArQrYrjrsr~r%r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrr
rrr,r3r:rArDrPrUrWr\rcrirorvr�r�r�r�r�r�s@rr	r	sw����9� �:�F�=�	=� �(?�6�@:�<	M�6�@*� %�*1�0'6�RO�"
*�C�,C�>G�
?�
"�6�>:�> 6�D!6�FO�$O�$O�,>�6(�((�,?�0�>9�O�<�G�:�?�
A�L�
$��*!:�F2�"%:�NA� 
G�!:�F(:�T
A�":�H*�&7�
F�
 �:�@:�@:�<>� 4�DC�	M�5�(;� 1�(*0�X00�d�(B�,B�2N�*B�25�-1�^F�(A�4!<�FA� ":�H%:�N#:�J*�(J�4�B
H�7�
F�"� 6�@:�@:�@:�<C�>�89� :�D*�.:�2�8	<�=� �:�66�6:�8�+�.>�8R�TKrr	c���eZdZ�fd�Z�xZS)�UnhashableComponentsTestsc�H��Gd�dtt|��t�}|S)Nc��eZdZy)�=UnhashableComponentsTests._getTargetClass.<locals>.ComponentsNrGr&rrrr��	rKrr)r�r�rr�)r
rr�s  �rrz)UnhashableComponentsTests._getTargetClass�	s#���	��8�$�O�Q�SW�	��r)r)rHrIrr�r�s@rr�r��	s
����rr�c��eZdZd�Zdd�Zd�Zd�Zd�Zd�Zd�Z	d	�Z
d
�Zd�Zd�Z
d
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zy)�UtilityRegistrationTestsc��ddlm}|S)Nrrk)rrrl)r
rls  rrz(UtilityRegistrationTests._getTargetClass�	���?�"�"rNc��ddlm}Gd�d|�}|d�}Gd�d�}|�}d}d	}	|j�}
|
|||||	|�||fS)
Nrrhc��eZdZy)�AUtilityRegistrationTests._makeOne.<locals>.InterfaceClassSubclassNrGr&rr�InterfaceClassSubclassr��	rKrr�rJc��eZdZd�Zy)�4UtilityRegistrationTests._makeOne.<locals>._Registryc��y�N�	_REGISTRYr&rs r�__repr__z=UtilityRegistrationTests._makeOne.<locals>._Registry.__repr__�	���"rN�r)rHrIr�r&rr�	_Registryr��	���
#rr�r�	DOCSTRING�rSrDr)r
r_r`rDr�rUr�rr�doc�klasss           rrz!UtilityRegistrationTests._makeOne�	sj��>�	�^�	�&�f�-��	#�	#��;�������$�$�&���h��d�I�s�G�D����	rc�J�ddlm}ddlm}|||j	��y)Nr��verifyClass��IUtilityRegistration)�zope.interface.verifyr�rqr�r)r
r�r�s   r�+test_class_conforms_to_IUtilityRegistrationzDUtilityRegistrationTests.test_class_conforms_to_IUtilityRegistration�	���5�B��(�$�*>�*>�*@�Arc�V�ddlm}ddlm}|j	�\}}}|||�y)Nr��verifyObjectr�)r�r�rqr�r)r
r�r��ur�_s     r�.test_instance_conforms_to_IUtilityRegistrationzGUtilityRegistrationTests.test_instance_conforms_to_IUtilityRegistration�	�$��6�B��M�M�O���A�q��)�2�.rc��Gd�d�}|�}|j|�\}}}|jt|�d|z�y)Nc��eZdZdZy)�:UtilityRegistrationTests.test___repr__.<locals>._Component�TESTNrGr&rr�
_Componentr��	����Hrr�zAUtilityRegistration(_REGISTRY, IFoo, %r, TEST, None, 'DOCSTRING')r9�r
r��
_componentr��	_registryrws      rr<z&UtilityRegistrationTests.test___repr__�	sG��	�	��\�
�#�}�}�Z�8���I�u�����b��O�$�
&�	'rc��Gd�d�}|�}|j|�\}}}t�|_|jt	|�d|z�y)Nc��eZdZd�Zy)�KUtilityRegistrationTests.test___repr___provided_wo_name.<locals>._Componentc��y�Nr�r&rs rr�zTUtilityRegistrationTests.test___repr___provided_wo_name.<locals>._Component.__repr__�	���rNr�r&rrr�r��	���
rr��AUtilityRegistration(_REGISTRY, None, %r, TEST, None, 'DOCSTRING')�rrarvr(r:r�s      r�test___repr___provided_wo_namez7UtilityRegistrationTests.test___repr___provided_wo_name�	�R��	�	� �\�
�#�}�}�Z�8���I�u��h�������b��O�$�
&�	'rc��Gd�d�}|�}|j|�\}}}t�|_|jt	|�d|z�y)Nc��eZdZd�Zy)�LUtilityRegistrationTests.test___repr___component_wo_name.<locals>._Componentc��yr�r&rs rr�zUUtilityRegistrationTests.test___repr___component_wo_name.<locals>._Component.__repr__�	r�rNr�r&rrr�r��	r�rr�r�r�r�s      r�test___repr___component_wo_namez8UtilityRegistrationTests.test___repr___component_wo_name�	r�rc��t�}|j|�\}}}|j|j�t	|��yr�rarr(�__hash__�id�r
r�r�r�rws     r�
test___hash__z&UtilityRegistrationTests.test___hash__�	�8���X�
�#�}�}�Z�8���I�u���������2��/rc�j�t�}|j|�\}}}|j||k(�yr�rarr+rs     r�test___eq___identityz-UtilityRegistrationTests.test___eq___identity�	�.���X�
�#�}�}�Z�8���I�u�����b��!rc��t�}|j|�\}}}|j|�\}}}|j||k(�yrr�r
r�r�r�rw�ur2r�s       r�test___eq___hitz(UtilityRegistrationTests.test___eq___hit�	�B���X�
�#�}�}�Z�8���I�u��M�M�*�-�	��Q������c�	�"rc��t�}t�}|j|�\}}}|j|�\}}}|j||k(�yr�rarr��r
r��_component2r�r�rwr
r�s        r�test___eq___missz)UtilityRegistrationTests.test___eq___miss�	�K���X�
��h��#�}�}�Z�8���I�u��M�M�+�.�	��Q������s��#rc�j�t�}|j|�\}}}|j||k7�yrrrs     r�test___ne___identityz-UtilityRegistrationTests.test___ne___identity�	�0���X�
�#�}�}�Z�8���I�u�����r��"rc��t�}|j|�\}}}|j|�\}}}|j||k7�yrrrs       r�test___ne___hitz(UtilityRegistrationTests.test___ne___hit�	�D���X�
�#�}�}�Z�8���I�u��M�M�*�-�	��Q������s��#rc��t�}t�}|j|�\}}}|j|�\}}}|j||k7�yrrrs        r�test___ne___missz)UtilityRegistrationTests.test___ne___miss�	�I���X�
��h��#�}�}�Z�8���I�u��M�M�+�.�	��Q������c�	�"rc�j�t�}|j|�\}}}|j||k�yrrrs     r�test___lt___identityz-UtilityRegistrationTests.test___lt___identity
�0���X�
�#�}�}�Z�8���I�u�����b��!rc��t�}|j|�\}}}|j|�\}}}|j||k�yrrrs       r�test___lt___hitz(UtilityRegistrationTests.test___lt___hit
�D���X�
�#�}�}�Z�8���I�u��M�M�*�-�	��Q������c��"rc��t�}t�}|j|�\}}}|j|�\}}}|dz|_|j||k�y�N�2�rarrr+rs        r�test___lt___missz)UtilityRegistrationTests.test___lt___miss
�T���X�
��h��#�}�}�Z�8���I�u��M�M�+�.�	��Q���3�;�������S��!rc�j�t�}|j|�\}}}|j||k�yrrrs     r�test___le___identityz-UtilityRegistrationTests.test___le___identity
r
rc��t�}|j|�\}}}|j|�\}}}|j||k�yrrrs       r�test___le___hitz(UtilityRegistrationTests.test___le___hit
rrc��t�}t�}|j|�\}}}|j|�\}}}|dz|_|j||k�yr&r(rs        r�test___le___missz)UtilityRegistrationTests.test___le___miss 
�T���X�
��h��#�}�}�Z�8���I�u��M�M�+�.�	��Q���3�;�������c�	�"rc�j�t�}|j|�\}}}|j||kD�yrrrs     r�test___gt___identityz-UtilityRegistrationTests.test___gt___identity(
r!rc��t�}t�}|j|�\}}}|j|�\}}}|dz|_|j||kD�yr&r(rs        r�test___gt___hitz(UtilityRegistrationTests.test___gt___hit-
�T���X�
��h��#�}�}�Z�8���I�u��M�M�+�.�	��Q���3�;�������b��!rc��t�}|j|�\}}}|j|�\}}}|j||kD�yrrrs       r�test___gt___missz)UtilityRegistrationTests.test___gt___miss5
�D���X�
�#�}�}�Z�8���I�u��M�M�*�-�	��Q������r��"rc�j�t�}|j|�\}}}|j||k\�yrrrs     r�test___ge___identityz-UtilityRegistrationTests.test___ge___identity;
r
rc��t�}t�}|j|�\}}}|j|�\}}}|dz|_|j||k\�yr&�rarrr�rs        r�test___ge___missz)UtilityRegistrationTests.test___ge___miss@
�V���X�
��h��#�}�}�Z�8���I�u��M�M�+�.�	��Q���3�;�������s��#rc��t�}|j|�\}}}|j|�\}}}|dz|_|j||k\�yr&r(rs       r�test___ge___hitz(UtilityRegistrationTests.test___ge___hitH
�M���X�
�#�}�}�Z�8���I�u��M�M�*�-�	��Q���3�;�������r�	�"r)NN)r)rHrIrrr�r�r<r�r�rr	rrrrrr r#r)r,r.r0r3r5r8r;r>rAr&rrr�r��	s���#��&B�
/�'�	'�	'�0�
"�
#�$�#�
$�#�"�
#�"�"�
#�#�"�
"�#�"�
$�#rr�c��eZdZd�Zdd�Zd�Zd�Zd�Zd�Zd�Z	d	�Z
d
�Zd�Zd�Z
d
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zy)�AdapterRegistrationTestsc��ddlm}|S)Nrra)rrrb)r
rbs  rrz(AdapterRegistrationTests._getTargetClassR
r�rNc��ddlm}Gd�d|�}|d�}|d�}Gd�d�}|�}d}d	}	|j�}
|
||f||||	�||fS)
Nrrhc��eZdZy)�/AdapterRegistrationTests._makeOne.<locals>.IFooNrGr&rrrJrHY
rKrrJr�c��eZdZd�Zy)�4AdapterRegistrationTests._makeOne.<locals>._Registryc��yr�r&rs rr�z=AdapterRegistrationTests._makeOne.<locals>._Registry.__repr__^
r�rNr�r&rrr�rJ]
r�rr�rr�r��r
r_rDrJrUr^r�rrr�r�s           rrz!AdapterRegistrationTests._makeOneV
�r��>�	�>�	��F�|���F�|��	#�	#��;�������$�$�&���h����t�Y��D����	rc�J�ddlm}ddlm}|||j	��y)Nrr���IAdapterRegistration)r�r�rqrPr)r
r�rPs   r�+test_class_conforms_to_IAdapterRegistrationzDAdapterRegistrationTests.test_class_conforms_to_IAdapterRegistrationi
r�rc�V�ddlm}ddlm}|j	�\}}}|||�y)Nrr�rO)r�r�rqrPr)r
r�rP�arr�s     r�.test_instance_conforms_to_IAdapterRegistrationzGAdapterRegistrationTests.test_instance_conforms_to_IAdapterRegistrationn
r�rc��Gd�d�}|�}|j|�\}}}|jt|�d|z�y)Nc��eZdZdZy)�:AdapterRegistrationTests.test___repr__.<locals>._Componentr�NrGr&rrr�rWu
r�rr�zCAdapterRegistration(_REGISTRY, [IBar], IFoo, %r, TEST, 'DOCSTRING')r9�r
r�r�rSr�rws      rr<z&AdapterRegistrationTests.test___repr__t
sI��	�	��\�
�#�}�}�Z�8���I�u�����b��� %�
'�	(rc��Gd�d�}|�}|j|�\}}}t�|_|jt	|�d|z�y)Nc��eZdZd�Zy)�KAdapterRegistrationTests.test___repr___provided_wo_name.<locals>._Componentc��yr�r&rs rr�zTAdapterRegistrationTests.test___repr___provided_wo_name.<locals>._Component.__repr__
r�rNr�r&rrr�r[~
r�rr��CAdapterRegistration(_REGISTRY, [IBar], None, %r, TEST, 'DOCSTRING')r�rXs      rr�z7AdapterRegistrationTests.test___repr___provided_wo_name}
�T��	�	� �\�
�#�}�}�Z�8���I�u��h�������b��� %�
'�	(rc��Gd�d�}|�}|j|�\}}}t�|_|jt	|�d|z�y)Nc��eZdZd�Zy)�LAdapterRegistrationTests.test___repr___component_wo_name.<locals>._Componentc��yr�r&rs rr�zUAdapterRegistrationTests.test___repr___component_wo_name.<locals>._Component.__repr__�
r�rNr�r&rrr�ra�
r�rr�r]r�rXs      rr�z8AdapterRegistrationTests.test___repr___component_wo_name�
r^rc��t�}|j|�\}}}|j|j�t	|��yrr�r
r�rSr�rws     rrz&AdapterRegistrationTests.test___hash__�
rrc�j�t�}|j|�\}}}|j||k(�yrrrds     rr	z-AdapterRegistrationTests.test___eq___identity�
r
rc��t�}|j|�\}}}|j|�\}}}|j||k(�yrr�r
r�rSr�rw�ar2r�s       rrz(AdapterRegistrationTests.test___eq___hit�
rrc��t�}t�}|j|�\}}}|j|�\}}}|j||k(�yrr�r
r�rrSr�rwrhr�s        rrz)AdapterRegistrationTests.test___eq___miss�
rrc�j�t�}|j|�\}}}|j||k7�yrrrds     rrz-AdapterRegistrationTests.test___ne___identity�
rrc��t�}|j|�\}}}|j|�\}}}|j||k7�yrrrgs       rrz)AdapterRegistrationTests.test___ne___miss�
rrc��t�}t�}|j|�\}}}|j|�\}}}|j||k7�yrrrjs        r�test___ne___hit_componentz2AdapterRegistrationTests.test___ne___hit_component�
rrc���ddlm}Gd�d|�}|d�}t�}|j|�\}}}|j|�\}}	}	||_|j||k7�y)Nrrhc��eZdZy)�?AdapterRegistrationTests.test___ne___hit_provided.<locals>.IFooNrGr&rrrJrq�
rKrrJrE)rSrDrarrvr+)
r
rDrJrNr�rSr�rwrhr�s
          r�test___ne___hit_providedz1AdapterRegistrationTests.test___ne___hit_provided�
sa��>�	�>�	��F�|���X�
�#�}�}�Z�8���I�u��M�M�*�-�	��Q���������c�	�"rc���ddlm}Gd�d|�}|d�}t�}t�}|j|�\}}}|j|�\}	}
}
|f|	_|j||	k7�y)Nrrhc��eZdZy)�?AdapterRegistrationTests.test___ne___hit_required.<locals>.IFooNrGr&rrrJru�
rKrrJrE)rSrDrarrir+)r
rDrJrNr�rrSr�rwrhr�s           r�test___ne___hit_requiredz1AdapterRegistrationTests.test___ne___hit_required�
sj��>�	�>�	��F�|���X�
��h��#�}�}�Z�8���I�u��M�M�+�.�	��Q���w�������c�	�"rc�j�t�}|j|�\}}}|j||k�yrrrds     rr z-AdapterRegistrationTests.test___lt___identity�
r!rc��t�}|j|�\}}}|j|�\}}}|j||k�yrrrgs       rr#z(AdapterRegistrationTests.test___lt___hit�
r$rc��t�}t�}|j|�\}}}|j|�\}}}|dz|_|j||k�yr&r(rjs        rr)z)AdapterRegistrationTests.test___lt___miss�
r*rc�j�t�}|j|�\}}}|j||k�yrrrds     rr,z-AdapterRegistrationTests.test___le___identity�
r
rc��t�}|j|�\}}}|j|�\}}}|j||k�yrrrgs       rr.z(AdapterRegistrationTests.test___le___hit�
rrc��t�}t�}|j|�\}}}|j|�\}}}|dz|_|j||k�yr&r(rjs        rr0z)AdapterRegistrationTests.test___le___miss�
r1rc�j�t�}|j|�\}}}|j||kD�yrrrds     rr3z-AdapterRegistrationTests.test___gt___identity�
r!rc��t�}t�}|j|�\}}}|j|�\}}}|dz|_|j||kD�yr&r(rjs        rr5z(AdapterRegistrationTests.test___gt___hit�
r6rc��t�}|j|�\}}}|j|�\}}}|j||kD�yrrrgs       rr8z)AdapterRegistrationTests.test___gt___missr9rc�j�t�}|j|�\}}}|j||k\�yrrrds     rr;z-AdapterRegistrationTests.test___ge___identityr
rc��t�}t�}|j|�\}}}|j|�\}}}|dz|_|j||k\�yr&r=rjs        rr>z)AdapterRegistrationTests.test___ge___missr?rc��t�}|j|�\}}}|j|�\}}}|dz|_|j||k\�yr&r(rgs       rrAz(AdapterRegistrationTests.test___ge___hitrBrr)r)rHrIrrrQrTr<r�r�rr	rrrrrnrrrvr r#r)r,r.r0r3r5r8r;r>rAr&rrrDrDP
s���#��&B�
/�(�	(�	(�0�
"�
#�$�#�
$�#�	#�
#�"�
#�"�"�
#�#�"�
"�#�"�
$�#rrDc�&�eZdZd�Zdd�Zd�Zd�Zy)�SubscriptionRegistrationTestsc��ddlm}|S)Nrr�)rrr�)r
r�s  rrz-SubscriptionRegistrationTests._getTargetClass#s��D�'�'rNc��ddlm}Gd�d|�}|d�}|d�}Gd�d�}|�}d}d	}	|j�}
|
||f||||	�||fS)
Nrrhc��eZdZy)�4SubscriptionRegistrationTests._makeOne.<locals>.IFooNrGr&rrrJr�*rKrrJr�c��eZdZd�Zy)�9SubscriptionRegistrationTests._makeOne.<locals>._Registryc��yr�r&rs rr�zBSubscriptionRegistrationTests._makeOne.<locals>._Registry.__repr__/r�rNr�r&rrr�r�.r�rr�rr�r�rLs           rrz&SubscriptionRegistrationTests._makeOne'rMrc�J�ddlm}ddlm}|||j	��y)Nrr��� ISubscriptionAdapterRegistration)r�r�rqr�r)r
r�r�s   r�7test_class_conforms_to_ISubscriptionAdapterRegistrationzUSubscriptionRegistrationTests.test_class_conforms_to_ISubscriptionAdapterRegistration:s��5�N��4�d�6J�6J�6L�Mrc�V�ddlm}ddlm}|j	�\}}}|||�y)Nrr�r�)r�r�rqr�r)r
r�r��sarr�s     r�:test_instance_conforms_to_ISubscriptionAdapterRegistrationzXSubscriptionRegistrationTests.test_instance_conforms_to_ISubscriptionAdapterRegistration?s$��6�N��]�]�_�	��Q���5�s�;rr)r)rHrIrrr�r�r&rrr�r�!s��(��&N�
<rr�c�8�eZdZd�Zd	d�Zd�Zd�Zd�Zd�Zd�Z	y)
�HandlerRegistrationTestsc��ddlm}|S)Nrr5)rrr6)r
r6s  rrz(HandlerRegistrationTests._getTargetClassHr�rNc��ddlm}Gd�d|�}|d�}Gd�d�}|�}d}d}|j�}	|	||f|||�||fS)	Nrrhc��eZdZy)�/HandlerRegistrationTests._makeOne.<locals>.IFooNrGr&rrrJr�OrKrrJc��eZdZd�Zy)�4HandlerRegistrationTests._makeOne.<locals>._Registryc��yr�r&rs rr�z=HandlerRegistrationTests._makeOne.<locals>._Registry.__repr__Sr�rNr�r&rrr�r�Rr�rr�rr�r�)
r
r_rDrJrUr�rrr�r�s
          rrz!HandlerRegistrationTests._makeOneLsg��>�	�>�	��F�|��	#�	#��;�������$�$�&���h����y�#�>����	rc�J�ddlm}ddlm}|||j	��y)Nrr���IHandlerRegistration)r�r�rqr�r)r
r�r�s   r�+test_class_conforms_to_IHandlerRegistrationzDHandlerRegistrationTests.test_class_conforms_to_IHandlerRegistration^r�rc�V�ddlm}ddlm}|j	�\}}}|||�y)Nrr�r�)r�r�rqr�r)r
r�r��hrr�s     r�.test_instance_conforms_to_IHandlerRegistrationzGHandlerRegistrationTests.test_instance_conforms_to_IHandlerRegistrationcr�rc��d�}|j|�\}}}|j|j|u�|j|j|ju�|j|jdu�y)Nc��t��rrZrfs rr\z:HandlerRegistrationTests.test_properties.<locals>._factoryjr]r)rr+�handlerr`rv)r
r\r�r�s    r�test_propertiesz(HandlerRegistrationTests.test_propertiesis^��	(��M�M�(�+���A�q�����
�
�h�.�/�����
�
�b�j�j�0�1�������t�+�,rc��Gd�d�}|j|��\}}}|jt|�d|z�y)Nc��eZdZdZy)�GHandlerRegistrationTests.test___repr___factory_w_name.<locals>._Factoryr�NrGr&rrrpr�rr�rrp�=HandlerRegistration(_REGISTRY, [IFoo], %r, TEST, 'DOCSTRING')r9�r
rpr�r�rws     r�test___repr___factory_w_namez5HandlerRegistrationTests.test___repr___factory_w_nameqsD��	�	� $�
�
�h�j� 9���I�u�����b��� %�
'�	(rc��Gd�d�}|j|��\}}}|jt|�d|z�y)Nc��eZdZd�Zy)�HHandlerRegistrationTests.test___repr___factory_wo_name.<locals>._Factoryc��yr�r&rs rr�zQHandlerRegistrationTests.test___repr___factory_wo_name.<locals>._Factory.__repr__{r�rNr�r&rrrpr�zr�rrpr�r9r�s     r�test___repr___factory_wo_namez6HandlerRegistrationTests.test___repr___factory_wo_nameysF��	�	�!%�
�
�h�j� 9���I�u�����b��� %�
'�	(rr)
r)rHrIrrr�r�r�r�r�r&rrr�r�Fs&��#��$B�
/�-�(�(rr�c��eZdZd�Zd�Zy)�PersistentAdapterRegistryc���|jj�}t|�D]3}||jvs|j	d�s�#|j|��5|jdd�|S)N�_v�ro)�__dict__�copyr��
_delegated�
startswith�pop)r
�state�ks   r�__getstate__z&PersistentAdapterRegistry.__getstate__�s^���
�
�"�"�$���e��	�A��D�O�O�#�q�|�|�D�'9��	�	�!��	�	�	�	�$����rc���|jdd�}|jj|�|j�||_|j
j
|�y)Nr*r&)r�r��update�
_createLookupr*r�r�)r
r��basess   r�__setstate__z&PersistentAdapterRegistry.__setstate__�sI���	�	�+�r�*���
�
���U�#�������������t�$rN)r)rHrIr�r�r&rrr�r��s���%rr�c��eZdZd�Zy)�PersistentComponentsc�@�t�|_t�|_yr)r�r-r.rs r�_init_registriesz%PersistentComponents._init_registries�s��1�3��
�2�4��rN)r)rHrIr�r&rrr�r��s��5rr�c��eZdZy)�PersistentDictComponentsNrGr&rrr�r��s��rr�c��eZdZd�Zy)�PersistentComponentsDictc�Z�tj|�tj||�yr)r�rr�)r
rs  rrz!PersistentComponentsDict.__init__�s���
�
�d���%�%�d�D�1rNr�r&rrr�r��s��2rr�c�$�eZdZd�Zd�Zd�Zd�Zy)�TestPersistentComponentsc��td�S)Nr�)r�rs rrz!TestPersistentComponents._makeOne�s
��#�F�+�+rc��yrr&�r
�mades  r�_check_equality_after_picklez5TestPersistentComponents._check_equality_after_pickle�s��rc���ddl}|j�}|j|�|j|j|��}|j	|j
d�y�Nrr�)�pickler�dumps�loadsr(r))r
r�r3�comp2s    r�test_pickles_emptyz+TestPersistentComponents.test_pickles_empty�sG����}�}������T�����V�\�\�$�/�0���������0rc��ddl}|j�}t�}|j|t�|j||j
t��|j|j|��}|j|jd�|j|j
t��|j|t�|j||j
t��|j|�yr�)
r�rrarTrrr?r�r�r(r)�assertIsNotNoner�)r
r�r3�utilityr�s     r�&test_pickles_with_utility_registrationz?TestPersistentComponents.test_pickles_with_utility_registration�s�����}�}����(�������	�	
�
�
�g��o�o�i�0�	2����V�\�\�$�/�0���������0�	
���U�-�-�i�8�9�	�����	�	
�
�
�g��&�&�y�1�	3�	
�)�)�%�0rN)r)rHrIrr�r�r�r&rrr�r��s��,�
�1�1rr�c��eZdZd�Zd�Zd�Zy)�TestPersistentDictComponentsc��tSr)r�rs rrz,TestPersistentDictComponents._getTargetClass����'�'rc�>�|j�d��}d|d<|S)Nr�r�*r$rr;s  rrz%TestPersistentDictComponents._makeOne�s%��%�t�#�#�%�6�2����U���rc�R�|jd|�|j|dd�y)Nr$r�)r�r(r�s  rr�z9TestPersistentDictComponents._check_equality_after_pickle�s$���
�
�e�T�"�����e��b�)rN)r)rHrIrrr�r&rrr�r��s��(��
*rr�c��eZdZd�Zy)�TestPersistentComponentsDictc��tSr)r�rs rrz,TestPersistentComponentsDict._getTargetClass�r�rN)r)rHrIrr&rrr�r��s��(rr�c��eZdZd�Zd�Zd�Zy)r c��||_|D�cic]}|t||���c}|_|j�D]\}}t	|||��ycc}wr)�module�getattr�
to_restore�items�setattr)r
r�rr$�values     rrz_Monkey.__init__�sR�����@B�C��3���� 4�4�C����(�(�*�	(�J�C���F�C��'�	(��Ds�Ac��|Srr&rs r�	__enter__z_Monkey.__enter__�s���rc�v�|jj�D]\}}t|j||��yr)r�r�r�r�)r
�exc_type�exc_val�exc_tbr$r�s      r�__exit__z_Monkey.__exit__�s2���/�/�/�/�1�	-�J�C���D�K�K��e�,�	-rN)r)rHrIrr�r�r&rrr r �s��(��-rr )r��unittestrrr'rrrr�TestCaser	r�r�rDr�r�r�r�r�r�r�r�r�r�r r&rr�<module>r�s�����$�;�.�o%K�h�'�'�o%K�dK���w#�x�0�0�w#�tN#�x�0�0�N#�b"<�H�$5�$5�"<�J:(�x�0�0�:(�x%� 8�%�"5�:�5�	�3�T�	�
2�t�%9�2�(1�x�0�0�(1�V*�#;�*�(�#?�(�

-�
-r
¿Qué es la limpieza dental de perros? - Clínica veterinaria


Es la eliminación del sarro y la placa adherida a la superficie de los dientes mediante un equipo de ultrasonidos que garantiza la integridad de las piezas dentales a la vez que elimina en profundidad cualquier resto de suciedad.

A continuación se procede al pulido de los dientes mediante una fresa especial que elimina la placa bacteriana y devuelve a los dientes el aspecto sano que deben tener.

Una vez terminado todo el proceso, se mantiene al perro en observación hasta que se despierta de la anestesia, bajo la atenta supervisión de un veterinario.

¿Cada cuánto tiempo tengo que hacerle una limpieza dental a mi perro?

A partir de cierta edad, los perros pueden necesitar una limpieza dental anual o bianual. Depende de cada caso. En líneas generales, puede decirse que los perros de razas pequeñas suelen acumular más sarro y suelen necesitar una atención mayor en cuanto a higiene dental.


Riesgos de una mala higiene


Los riesgos más evidentes de una mala higiene dental en los perros son los siguientes:

  • Cuando la acumulación de sarro no se trata, se puede producir una inflamación y retracción de las encías que puede descalzar el diente y provocar caídas.
  • Mal aliento (halitosis).
  • Sarro perros
  • Puede ir a más
  • Las bacterias de la placa pueden trasladarse a través del torrente circulatorio a órganos vitales como el corazón ocasionando problemas de endocarditis en las válvulas. Las bacterias pueden incluso acantonarse en huesos (La osteomielitis es la infección ósea, tanto cortical como medular) provocando mucho dolor y una artritis séptica).

¿Cómo se forma el sarro?

El sarro es la calcificación de la placa dental. Los restos de alimentos, junto con las bacterias presentes en la boca, van a formar la placa bacteriana o placa dental. Si la placa no se retira, al mezclarse con la saliva y los minerales presentes en ella, reaccionará formando una costra. La placa se calcifica y se forma el sarro.

El sarro, cuando se forma, es de color blanquecino pero a medida que pasa el tiempo se va poniendo amarillo y luego marrón.

Síntomas de una pobre higiene dental
La señal más obvia de una mala salud dental canina es el mal aliento.

Sin embargo, a veces no es tan fácil de detectar
Y hay perros que no se dejan abrir la boca por su dueño. Por ejemplo…

Recientemente nos trajeron a la clínica a un perro que parpadeaba de un ojo y decía su dueño que le picaba un lado de la cara. Tenía molestias y dificultad para comer, lo que había llevado a sus dueños a comprarle comida blanda (que suele ser un poco más cara y llevar más contenido en grasa) durante medio año. Después de una exploración oftalmológica, nos dimos cuenta de que el ojo tenía una úlcera en la córnea probablemente de rascarse . Además, el canto lateral del ojo estaba inflamado. Tenía lo que en humanos llamamos flemón pero como era un perro de pelo largo, no se le notaba a simple vista. Al abrirle la boca nos llamó la atención el ver una muela llena de sarro. Le realizamos una radiografía y encontramos una fístula que llegaba hasta la parte inferior del ojo.

Le tuvimos que extraer la muela. Tras esto, el ojo se curó completamente con unos colirios y una lentilla protectora de úlcera. Afortunadamente, la úlcera no profundizó y no perforó el ojo. Ahora el perro come perfectamente a pesar de haber perdido una muela.

¿Cómo mantener la higiene dental de tu perro?
Hay varias maneras de prevenir problemas derivados de la salud dental de tu perro.

Limpiezas de dientes en casa
Es recomendable limpiar los dientes de tu perro semanal o diariamente si se puede. Existe una gran variedad de productos que se pueden utilizar:

Pastas de dientes.
Cepillos de dientes o dedales para el dedo índice, que hacen más fácil la limpieza.
Colutorios para echar en agua de bebida o directamente sobre el diente en líquido o en spray.

En la Clínica Tus Veterinarios enseñamos a nuestros clientes a tomar el hábito de limpiar los dientes de sus perros desde que son cachorros. Esto responde a nuestro compromiso con la prevención de enfermedades caninas.

Hoy en día tenemos muchos clientes que limpian los dientes todos los días a su mascota, y como resultado, se ahorran el dinero de hacer limpiezas dentales profesionales y consiguen una mejor salud de su perro.


Limpiezas dentales profesionales de perros y gatos

Recomendamos hacer una limpieza dental especializada anualmente. La realizamos con un aparato de ultrasonidos que utiliza agua para quitar el sarro. Después, procedemos a pulir los dientes con un cepillo de alta velocidad y una pasta especial. Hacemos esto para proteger el esmalte.

La frecuencia de limpiezas dentales necesaria varía mucho entre razas. En general, las razas grandes tienen buena calidad de esmalte, por lo que no necesitan hacerlo tan a menudo e incluso pueden pasarse la vida sin requerir una limpieza. Sin embargo, razas pequeñas como el Yorkshire o el Maltés, deben hacérselas todos los años desde cachorros si se quiere conservar sus piezas dentales.

Otro factor fundamental es la calidad del pienso. Algunas marcas han diseñado croquetas que limpian la superficie del diente y de la muela al masticarse.

Ultrasonido para perros

¿Se necesita anestesia para las limpiezas dentales de perros y gatos?

La limpieza dental en perros no es una técnica que pueda practicarse sin anestesia general , aunque hay veces que los propietarios no quieren anestesiar y si tiene poco sarro y el perro es muy bueno se puede intentar…… , pero no se va a poder pulir ni acceder a todas la zona de la boca …. Además los limpiadores dentales van a irrigar agua y hay riesgo de aspiración a vías respiratorias si no se realiza una anestesia correcta con intubación traqueal . En resumen , sin anestesia no se va hacer una correcta limpieza dental.

Tampoco sirve la sedación ya que necesitamos que el animal esté totalmente quieto, y el veterinario tenga un acceso completo a todas sus piezas dentales y encías.

Alimentos para la limpieza dental

Hay que tener cierto cuidado a la hora de comprar determinados alimentos porque no todos son saludables. Algunos tienen demasiado contenido graso, que en exceso puede causar problemas cardiovasculares y obesidad.

Los mejores alimentos para los dientes son aquellos que están elaborados por empresas farmacéuticas y llevan componentes químicos con tratamientos específicos para el diente del perro. Esto implica no solo limpieza a través de la acción mecánica de morder sino también un tratamiento antibacteriano para prevenir el sarro.

Conclusión

Si eres como la mayoría de dueños, por falta de tiempo , es probable que no estés prestando la suficiente atención a la limpieza dental de tu perro. Por eso te animamos a que comiences a limpiar los dientes de tu perro y consideres atender a su higiene bucal con frecuencia.

Estas simples medidas pueden conllevar a que tu perro tenga una vida más larga y mucho más saludable.

Si te resulta imposible introducir un cepillo de dientes a tu perro en la boca, pásate con él por clínica Tus Veterinarios y te explicamos cómo hacerlo.

Necesitas hacer una limpieza dental profesional a tu mascota?
Llámanos al 622575274 o contacta con nosotros

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *

¡Hola!