%PDF- %PDF-
Mini Shell

Mini Shell

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

�

��eIe����dZddlZddlmZddlmZddlmZe�ZGd�dej�Z	Gd�d	ej�Z
Gd
�dej�ZGd�d
ej�ZGd�dee�Z
Gd�de�ZGd�de�ZGd�de�ZGd�deeej�ZGd�deej�ZGd�dej�ZGd�dej�ZGd�dej�ZGd �d!e�ZGd"�d#e�ZGd$�d%ej�ZGd&�d'ej�ZGd(�d)�Zd*�Zd+�ZGd,�d-�Zy).zTest Interface implementation
�N)�MissingSomeAttrs)�OptimizationTestMixin)�CleanUpc��eZdZd�Zd�Zy)�Test_invariantc����ddlm�ddlm}d��G��fd�d�}|jt	||d�d�gi�y)Nr��	invariant��TAGGED_DATAc��t���N��NotImplementedError��args�kws  �E/usr/lib/python3/dist-packages/zope/interface/tests/test_interface.py�_checkz,Test_invariant.test_w_single.<locals>._check'���%�'�'�c�"��eZdZW�W��y)�)Test_invariant.test_w_single.<locals>.FooN��__name__�
__module__�__qualname__)rr
s��r�Foor*s����f�rr�
invariants��zope.interface.interfacer
r�assertEqual�getattr)�selfrrrr
s   @@r�
test_w_singlezTest_invariant.test_w_single#s=���6�8�	(�	�	�	
�����k�4�8�&���1�	3rc�����ddlm�ddlm}d��d��G���fd�d�}|jt	||d�d��gi�y)	Nrr	rc��t��rrrs  rrz.Test_invariant.test_w_multiple.<locals>._check4rrc��t��rrrs  r�_another_checkz6Test_invariant.test_w_multiple.<locals>._another_check7rrc�6��eZdZW�W��W�W��y)�+Test_invariant.test_w_multiple.<locals>.FooNr)r)rr
s���rrr+:s����f���n�%rrrr )r$rrr)rr
s   @@@r�test_w_multiplezTest_invariant.test_w_multiple0sF���6�8�	(�	(�	&�	&�	
�����k�4�8�&���(@�A�	CrN)rrrr%r,�rrrr!s
��3�Crrc��eZdZd�Zd�Zd�Zy)�Test_taggedValuec�v��ddlm�ddlm}G�fd�d�}|jt	||d�ddgi�y)Nr��taggedValuerc�$��eZdZW�ddg�y)�+Test_taggedValue.test_w_single.<locals>.Foo�bar�bazNrr1s�rrr4Hs������w�'rrr5r6�r!r2rr"r#�r$rrr2s   @rr%zTest_taggedValue.test_w_singleDs8���8�8�	(�	(�	
�����k�4�8��%��)�	+rc�x��ddlm�ddlm}G�fd�d�}|jt	||d�dgdd��y)	Nrr1rc�8��eZdZW�ddg�W�dd�y)�-Test_taggedValue.test_w_multiple.<locals>.Foor5r6�qux�spamNrr1s�rrr;Rs������w�'���v�&rrr6r=�r5r<r7r8s   @rr,z Test_taggedValue.test_w_multipleNs8���8�8�	'�	'�	
�����k�4�8�"'���8�	:rc�v��ddlm�ddlm}G�fd�d�}|jt	||d�ddd��y)	Nrr1rc�L��eZdZW�ddg�W�dd�W�dd�y)�9Test_taggedValue.test_w_multiple_overwriting.<locals>.Foor5r6r<r=�frobNrr1s�rrrA]s#������w�'���v�&���v�&rrrBr=r>r7r8s   @r�test_w_multiple_overwritingz,Test_taggedValue.test_w_multiple_overwritingYs6���8�8�	'�	'�
	
�����k�4�8�!'��7�	9rN)rrrr%r,rCr-rrr/r/Bs��+�	:�
9rr/c�`�eZdZdZd�Zdd�Zd�Zd�Zd�Zd�Z	d	�Z
d
�Zd�Zd�Z
d
�Zd�Zd�Zy)�ElementTests�	AnElementc��ddlm}|S)Nr)�Element)r!rH)r$rHs  r�_getTargetClasszElementTests._getTargetClassjs
��4��rNc�J�|�|j}|j�|�Sr)�DEFAULT_NAMErI)r$�names  r�_makeOnezElementTests._makeOnens(���<��$�$�D�%�t�#�#�%�d�+�+rc��|j�}|j|j|j�|j|j	�|j�|j|j
d�|j|j
�d�|jt|j��g�y)N�)	rMr"rrK�getName�__doc__�getDoc�list�getTaggedValueTags�r$�elements  r�test_ctor_defaultszElementTests.test_ctor_defaultsss����-�-�/������)�)�4�+<�+<�=�������*�D�,=�,=�>�������"�-�������)�2�.�����g�8�8�:�;�R�@rc��|jd�}|j|jd�|j|jd�y)Nz
An Element)rMr"rrQrUs  r�test_ctor_no_doc_space_in_namez+ElementTests.test_ctor_no_doc_space_in_name{s:���-�-��-������)�)�4�0�������,�7rc�f�|j�}|jt|jd�y�N�nonesuch)rM�assertRaises�KeyError�getTaggedValuerUs  r�test_getTaggedValue_missz%ElementTests.test_getTaggedValue_miss�s%���-�-�/�����(�G�$:�$:�J�Grc���|j�}|jgt|j���|j	dd�|jdgt|j���y�N�foor5)rMr"rS�getDirectTaggedValueTags�setTaggedValuerUs  r�test_getDirectTaggedValueTagsz*ElementTests.test_getDirectTaggedValueTags�s[���-�-�/������T�'�"B�"B�"D�E�F����u�e�,����%��$�w�'G�'G�'I�"J�Krc�f�|j�}|j|jd�d�yr[�rMr"�queryTaggedValuerUs  r�test_queryTaggedValue_missz'ElementTests.test_queryTaggedValue_miss�s(���-�-�/������1�1�*�=�t�Drc�h�|j�}|j|jdd�d�y�Nr\r5rhrUs  r�$test_queryTaggedValue_miss_w_defaultz1ElementTests.test_queryTaggedValue_miss_w_default�s*���-�-�/������1�1�*�e�D�e�Lrc�f�|j�}|jt|jd�yr[)rMr]r^�getDirectTaggedValuerUs  r�test_getDirectTaggedValue_missz+ElementTests.test_getDirectTaggedValue_miss�s%���-�-�/�����(�G�$@�$@�*�Mrc�f�|j�}|j|jd�d�yr[�rMr"�queryDirectTaggedValuerUs  r� test_queryDirectTaggedValue_missz-ElementTests.test_queryDirectTaggedValue_miss�s(���-�-�/������7�7�
�C�T�Jrc�h�|j�}|j|jdd�d�yrlrrrUs  r�*test_queryDirectTaggedValue_miss_w_defaultz7ElementTests.test_queryDirectTaggedValue_miss_w_default�s*���-�-�/������7�7�
�E�J�E�Rrc� �|j�}|jdd�|jt|j	��dg�|j|jd�d�|j|j
d�d�yrb)rMrer"rSrTr_rirUs  r�test_setTaggedValuez ElementTests.test_setTaggedValue�ss���-�-�/�����u�e�,�����g�8�8�:�;�e�W�E�����/�/��6��>�����1�1�%�8�%�@rc�N�ddlm}ddlm}|j	�}|||�y)Nr)�IElement��verifyObject)�zope.interface.interfacesrz�zope.interface.verifyr|rM)r$rzr|rVs    r�
test_verifieszElementTests.test_verifies�s��6�6��-�-�/���X�w�'rr)rrrrKrIrMrWrYr`rfrjrmrprtrvrxrr-rrrErEfsQ���L��,�
A�8�
H�L�E�M�N�K�S�A�(rrEc�(�eZdZd�ZeZd�Zd�Zd�Zy)�GenericSpecificationBaseTestsc��ddlm}|S)Nr)�SpecificationBasePy)r!r�)r$r�s  r�_getFallbackClassz/GenericSpecificationBaseTests._getFallbackClass�s��@�"�"rc�,�|j��Sr�rI�r$s rrMz&GenericSpecificationBaseTests._makeOne�s��%�t�#�#�%�'�'rc����ddlm}ddlm�|j	�}�fd�}t||��5|j
|jt���ddd�y#1swYyxYw)Nr��	interface��_emptyc����Srr-��objr�s �r�_providedByzGGenericSpecificationBaseTests.test_providedBy_miss.<locals>._providedBy������Mr��
providedBy)	�zope.interfacer��zope.interface.declarationsr�rM�_Monkey�assertFalser��object)r$r��sbr�r�s    @r�test_providedBy_missz2GenericSpecificationBaseTests.test_providedBy_miss�sQ���,�6�
�]�]�_��	�
�Y�;�
7�	6����R�]�]�6�8�4�5�	6�	6�	6���)A"�"A+c����ddlm}ddlm�|j	�}�fd�}t||��5|j
|jt���ddd�y#1swYyxYw)Nrr�r�c����Srr-r�s �r�_implementedByzMGenericSpecificationBaseTests.test_implementedBy_miss.<locals>._implementedBy�r�r��
implementedBy)	r�r�r�r�rMr�r�r�r�)r$r�r�r�r�s    @r�test_implementedBy_missz5GenericSpecificationBaseTests.test_implementedBy_miss�sS���,�6�
�]�]�_��	�
�Y�n�
=�	9����R�-�-�f�h�7�8�	9�	9�	9�r�N)rrrr�rIrMr�r�r-rrr�r��s��#�(�O�(�6�9rr�c��eZdZd�Zy)�SpecificationBaseTestsc��ddlm}|S)Nr)�SpecificationBase)r!r�)r$r�s  rrIz&SpecificationBaseTests._getTargetClass�s��>� � rN�rrrrIr-rrr�r��s��!rr�c�0�eZdZd�Zd�Zd�Zd�Zd�Zd�Zy)�SpecificationBasePyTestsc��|j�}i|_|j|jt	���yr�rM�_impliedr��isOrExtendsr��r$r�s  r�test___call___missz+SpecificationBasePyTests.test___call___miss��-��
�]�]�_�������������1�2rc�x�|j�}t�}|ii|_|j||��yr�rMr�r��
assertTrue�r$r��testings   r�test___call___hitz*SpecificationBasePyTests.test___call___hit��/��
�]�]�_���(����m�������7��$rc��|j�}i|_|j|jt	���yrr�r�s  r�test_isOrExtends_missz.SpecificationBasePyTests.test_isOrExtends_miss�r�rc�x�|j�}t�}|ii|_|j||��yrr�r�s   r�test_isOrExtends_hitz-SpecificationBasePyTests.test_isOrExtends_hit�r�rc�����ddlm}|j��G�fd�d���fd�}t||��5|j	�jt
���ddd�y#1swYyxYw)Nrr�c���eZdZW�iiZy)�>SpecificationBasePyTests.test_implementedBy_hit.<locals>._DeclN�rrrr��r�s�r�_Declr�������B�y�Hrr�c�����Srr-�r�r�s �rr�zGSpecificationBasePyTests.test_implementedBy_hit.<locals>._implementedBy��
����7�Nrr�)r�r�rMr�r�r�r�)r$r�r�r�r�s   @@r�test_implementedBy_hitz/SpecificationBasePyTests.test_implementedBy_hit�sX���,�
�]�]�_��	!�	!�	�
�Y�n�
=�	8��O�O�B�,�,�V�X�6�7�	8�	8�	8���)A)�)A2c�����ddlm}|j��G�fd�d���fd�}t||��5|j	�jt
���ddd�y#1swYyxYw)Nrr�c���eZdZW�iiZy)�;SpecificationBasePyTests.test_providedBy_hit.<locals>._DeclNr�r�s�rr�r��r�rr�c�����Srr-r�s �rr�zASpecificationBasePyTests.test_providedBy_hit.<locals>._providedBy�r�rr�)r�r�rMr�r�r�r�)r$r�r�r�r�s   @@r�test_providedBy_hitz,SpecificationBasePyTests.test_providedBy_hit�sV���,�
�]�]�_��	!�	!�	�
�Y�;�
7�	5��O�O�B�M�M�&�(�3�4�	5�	5�	5�r�N)	rrrr�r�r�r�r�r�r-rrr�r��s ��3�
%�3�
%�8�5rr�c�0�eZdZd�Zd�Zd�Zd�Zd�Zd�Zy)�!NameAndModuleComparisonTestsMixinc�&�|jdd�S)N�a�b)rMr�s r�_makeOneToComparez3NameAndModuleComparisonTestsMixin._makeOneToCompares���}�}�S�#�&�&rc���ddl}|j�}t||�}t|d|z�}G�fd�d��Gd�d��}Gd�d��}|j|�jd	�|j|�j
d	�|j
t�5t|�d
�ddd�|j
t�5t|�d�ddd�||fD]#}|j||��t��%Gd�d
��}	|j|||	���|j||	��t�Gd�d�}
|j||
��t�|j
t�5|||
��ddd�Gd�dt�}|�_
|j
|�5t|�d
�ddd�|j
|�5t|�d�ddd�||fD]Q}|j
|�5|||��ddd�|j
|�5||��ddd��Sy#1swY���xYw#1swY���xYw#1swY��xYw#1swY��xYw#1swY��xYw#1swY�qxYw#1swY��xYw)Nrz__%s__c���eZdZeZ�fd�Zy)�aNameAndModuleComparisonTestsMixin.__check_NotImplemented_comparison.<locals>.RaisesErrorOnMissingc�t��	tj||�S#t$r�j}||��wxYwr)r��__getattribute__�AttributeError�Exc)r$rL�exc�RaisesErrorOnMissings   �rr�zrNameAndModuleComparisonTestsMixin.__check_NotImplemented_comparison.<locals>.RaisesErrorOnMissing.__getattribute__s>���$�!�2�2�4��>�>��%�$�.�2�2�C��d�)�O�$�s��7N)rrrr�r�r�)r�s�rr�r�s
��� �C�
$rr�c�"�eZdZd�Zed��Zy)�`NameAndModuleComparisonTestsMixin.__check_NotImplemented_comparison.<locals>.RaisesErrorOnModulec��d|_y�Nrc)rr�s r�__init__ziNameAndModuleComparisonTestsMixin.__check_NotImplemented_comparison.<locals>.RaisesErrorOnModule.__init__s	�� %��
rc��t�r)r�r�s rrzkNameAndModuleComparisonTestsMixin.__check_NotImplemented_comparison.<locals>.RaisesErrorOnModule.__module__s��$�$rN)rrrr��propertyr-rr�RaisesErrorOnModuler�s��
&�
�
%��
%rr�c��eZdZd�Zy)�^NameAndModuleComparisonTestsMixin.__check_NotImplemented_comparison.<locals>.RaisesErrorOnNamec��d|_yr��rr�s rr�zgNameAndModuleComparisonTestsMixin.__check_NotImplemented_comparison.<locals>.RaisesErrorOnName.__init__$s	��"'��rN�rrrr�r-rr�RaisesErrorOnNamer�#s��
(rr�rcrrc�&�eZdZd�ZeZeZeZeZeZy)�`NameAndModuleComparisonTestsMixin.__check_NotImplemented_comparison.<locals>.AllowsAnyComparisonc��y�NTr-)r$�others  r�__eq__zgNameAndModuleComparisonTestsMixin.__check_NotImplemented_comparison.<locals>.AllowsAnyComparison.__eq__5���rN�	rrrr��__lt__�__le__�__gt__�__ge__�__ne__r-rr�AllowsAnyComparisonr�4s ��
��F��F��F��F��Frr�c�$�eZdZdZeZeZeZeZeZy)�_NameAndModuleComparisonTestsMixin.__check_NotImplemented_comparison.<locals>.AllowsNoComparisonNr�r-rr�AllowsNoComparisonr�As ���F��F��F��F��F��Frr�c��eZdZy)�XNameAndModuleComparisonTestsMixin.__check_NotImplemented_comparison.<locals>.MyExceptionNrr-rr�MyExceptionr�N���rr�)�operatorr�r#r"rrr]r��assertIs�NotImplementedr��	TypeError�	Exceptionr�)
r$rLr��ib�op�methr�r��clsr�r�r�r�s
            @r�!__check_NotImplemented_comparisonzCNameAndModuleComparisonTestsMixin.__check_NotImplemented_comparisons����	�
�
#�
#�
%��
�X�t�
$���r�8�d�?�+��
	$�	$�	%�"6�	%�	(� 4�	(�	
���,�.�7�7��?����*�,�7�7��?�
�
�
�~�
.�	9��'�)�<�8�	9�
�
�
�~�
.�	5��%�'��4�	5�'�(9�9�	7�C��M�M�$�s�u�+�~�6�	7�	�"6�	�	
����2�2�4�5�6��
�
�d�.�0�1�>�B�	�	�	
�
�
�d�-�/�0�.�A�
�
�
�y�
)�	)��r�%�'�(�	)�	�)�	�$/�� �
�
�
�{�
+�	9��'�)�<�8�	9�
�
�
�{�
+�	5��%�'��4�	5�'�(9�9�	�C��"�"�;�/�
��2�s�u�
�
��"�"�;�/�
��S�U��
�
�	�_	9�	9��	5�	5��>	)�	)��	9�	9��	5�	5��
�
��
�
�sT�*J�J�&J�$J(�J4�K�)K�J�J�J%�(J1�4J=�K		�K	c�&�|jd�y)N�lt��C_NameAndModuleComparisonTestsMixin__check_NotImplemented_comparisonr�s r�test__lt__NotImplementedz:NameAndModuleComparisonTestsMixin.test__lt__NotImplemented^����.�.�t�4rc�&�|jd�y)N�ler
r�s r�test__le__NotImplementedz:NameAndModuleComparisonTestsMixin.test__le__NotImplementedar
rc�&�|jd�y)N�gtr
r�s r�test__gt__NotImplementedz:NameAndModuleComparisonTestsMixin.test__gt__NotImplementeddr
rc�&�|jd�y)N�ger
r�s r�test__ge__NotImplementedz:NameAndModuleComparisonTestsMixin.test__ge__NotImplementedgr
rN)	rrrr�rrrrrr-rrr�r�s"��'�U�n5�5�5�5rr�c�8�eZdZd�Zd�Zd	d�Zd�Zd�Zd�Zd�Z	y)
�InterfaceBaseTestsMixinc��t�rrr�s rrIz'InterfaceBaseTestsMixin._getTargetClassns��!�!rc��ddlm}|S)Nr)�InterfaceBasePy)r!r)r$rs  rr�z)InterfaceBaseTestsMixin._getFallbackClassqs��<��rNc�L��G�fd�d|j��}|||�S)Nc���eZdZd�Z�fd�Zy)�,InterfaceBaseTestsMixin._makeOne.<locals>.IBc��||�Srr-)r$�conforms  r�
_call_conformz:InterfaceBaseTestsMixin._makeOne.<locals>.IB._call_conformxs���t�}�$rc����Srr-)r$r��object_should_provides  �rr�z7InterfaceBaseTestsMixin._makeOne.<locals>.IB.providedByzs	���,�,rN)rrrr!r�)r#s�r�IBrws
���
%�
-rr$r�)r$r#rL�moduler$s `   rrMz InterfaceBaseTestsMixin._makeOnevs'���	-��%�%�'�	-�
�$���rc���|jd�}t��G�fd�d�}|j||����y)NFc���eZdZ�fd�Zy)�UInterfaceBaseTestsMixin.test___call___w___conform___returning_value.<locals>._Adaptedc����Srr-)r$�iface�	conformeds  �r�__conform__zaInterfaceBaseTestsMixin.test___call___w___conform___returning_value.<locals>._Adapted.__conform__�s	��� � rN�rrrr,)r+s�r�_Adaptedr(�s���
!rr.)rMr�r�)r$rr.r+s   @r�+test___call___w___conform___returning_valuezCInterfaceBaseTestsMixin.test___call___w___conform___returning_value~s8���
�]�]�5�
!���H�	�	!�	!�	
�
�
�b���n�i�0rc��|jd�}||j�f}t�}t�}|j|||�|�y)NF)rMrIr�r�)r$r�__traceback_info__�adapted�	alternates     r�7test___call___wo___conform___ob_no_provides_w_alternatezOInterfaceBaseTestsMixin.test___call___wo___conform___ob_no_provides_w_alternate�sG��
�]�]�5�
!����!5�!5�!7�7���(���H�	��
�
�b��)�,�i�8rc���|jd�}|jt�5}|t��ddd�|j	dtj��y#1swY�/xYw)NFzCould not adapt)rMr]rr��assertIn�str�	exception)r$rr�s   r�7test___call___w___conform___ob_no_provides_wo_alternatezOInterfaceBaseTestsMixin.test___call___w___conform___ob_no_provides_wo_alternate�sX��
�]�]�5�
!��
�
�
�y�
)�	�S��v�x�L�	�	
�
�
�'��S�]�]�);�<�	�	�s�A&�&A/c�P�tj||j�d��y)Nr,)�expected_missing)r�test_raisesrMr�s r�6test___call___w_no_conform_catches_only_AttributeErrorzNInterfaceBaseTestsMixin.test___call___w_no_conform_catches_only_AttributeError�s���$�$�T�4�=�=�?�]�[r)FNN)
rrrrIr�rMr/r4r9r=r-rrrrks&��"��
 �1�9�=�\rrc��eZdZd�Zy)�InterfaceBaseTestsc��ddlm}|S)Nr)�
InterfaceBase)r!rA)r$rAs  rrIz"InterfaceBaseTests._getTargetClass����:��rNr�r-rrr?r?�s��rr?c�6�eZdZejZd�Zd�Zd�Zy)�InterfaceBasePyTestsc�x�|jd�}Gd�d�}|�}|j||�|�y)NTc��eZdZd�Zy)�SInterfaceBasePyTests.test___call___w___conform___miss_ob_provides.<locals>._Adaptedc��yrr-�r$r*s  rr,z_InterfaceBasePyTests.test___call___w___conform___miss_ob_provides.<locals>._Adapted.__conform__�r�rNr-r-rrr.rG����
rr.)rMr�)r$rr.r2s    r�,test___call___w___conform___miss_ob_provideszAInterfaceBasePyTests.test___call___w___conform___miss_ob_provides�s5��
�]�]�4�
 ��	�	��*���
�
�b��k�7�+rc�|�|jd�}t�}|j|j|�|�yr�)rMr�r��	__adapt__)r$rr2s   r�test___adapt___ob_providesz/InterfaceBasePyTests.test___adapt___ob_provides�s.��
�]�]�4�
 ���(���
�
�b�l�l�7�+�W�5rc���ddlm}|jd�}t�}g��fd�}d�}t	|||g��5|j|j
|�|�|j�||fg�ddd�y#1swYyxYw)Nrr�Fc�,���j||f�yr��append)r*r��_misseds  �r�
_hook_misszQInterfaceBasePyTests.test___adapt___ob_no_provides_uses_hooks.<locals>._hook_miss�s����N�N�E�3�<�(rc��|Srr-�r*r�s  r�	_hook_hitzPInterfaceBasePyTests.test___adapt___ob_no_provides_uses_hooks.<locals>._hook_hit�s���Jr��
adapter_hooks)r�r�rMr�r�r�rMr")r$r�rr2rTrWrSs      @r�(test___adapt___ob_no_provides_uses_hooksz=InterfaceBasePyTests.test___adapt___ob_no_provides_uses_hooks�s{���,�
�]�]�5�
!���(����	)�	�
�Y�z�9�.E�
F�	7��M�M�"�,�,�w�/��9����W��G�}�o�6�	7�	7�	7�s�7A<�<BN)	rrrrr�rIrKrNrZr-rrrDrD�s��.�?�?�O�,�6�
7rrDc�p�eZdZd�Zefd�Zd�Zd�Zd�Zd�Z	d�Z
d�Zd	�Zd
�Z
d�Zd�Zd
�Zd�Zd�Zd�Zy)�SpecificationTestsc��ddlm}|S)Nr)�
Specification)r!r^)r$r^s  rrIz"SpecificationTests._getTargetClass�rBrc�h�|tur|j��S|j�|�Sr)�_markerrI)r$�basess  rrMzSpecificationTests._makeOne�s4���G��)�4�'�'�)�+�+�%�t�#�#�%�e�,�,rc�p�ddlm}|j�}|j|jd�|jt|j�d�|j||jv�|j||jv�|jt|j�d�y)Nr��	Interfacer-�)	r!rdrMr"�	__bases__�lenr�r��
dependents)r$rd�specs   r�	test_ctorzSpecificationTests.test_ctor�s���6��}�}����������,�����T�]�]�+�Q�/������
�
�-�.����	�T�]�]�2�3�����T�_�_�-�q�1rc���|j�}t�}|j|�|jt	|j
�d�|j|j
|d�y�N�)rM�DummyDependent�	subscriber"rgrh�r$ri�deps   r�test_subscribe_first_timez,SpecificationTests.test_subscribe_first_time�sS���}�}���������s������T�_�_�-�q�1��������-�q�1rc��|j�}t�}|j|�|j|�|j|j|d�y)Nre)rMrnror"rhrps   r�test_subscribe_againz'SpecificationTests.test_subscribe_again�sF���}�}���������s�����s���������-�q�1rc�z�|j�}t�}|jt|j|�yr)rMrnr]r^�unsubscriberps   r�test_unsubscribe_missz(SpecificationTests.test_unsubscribe_miss�s-���}�}���������(�D�$4�$4�c�:rc�8�|j�}t�}|j|�|j|�|j|�|j	|j
|d�|j|�|j
||j
v�yrl)rMrnrorvr"rhr�rps   r�test_unsubscribez#SpecificationTests.test_unsubscribe�sy���}�}���������s�����s��������������-�q�1�������������/�0rc��ddlm}|j�}t�}|j	|�Gd�d|�}Gd�d|�}|f|_|j
|j|g�|j
|j|d�|f|_|j
|jj|�d�|j
|j|d�y)Nrrcc��eZdZy)�VSpecificationTests.test___setBases_subscribes_bases_and_notifies_dependents.<locals>.INrr-rr�Ir|�r�rr}c��eZdZy)�VSpecificationTests.test___setBases_subscribes_bases_and_notifies_dependents.<locals>.JNrr-rr�Jr�r�rr�rm)
r!rdrMrnrorfr"�_changedrh�get)r$rdrirqr}r�s      r�8test___setBases_subscribes_bases_and_notifies_dependentszKSpecificationTests.test___setBases_subscribes_bases_and_notifies_dependents�s���6��}�}���������s��	�	�	�	�	�	������������v�.�������d�+�Q�/�����������)�)�$�/��6�������d�+�Q�/rc��ddlm}Gd�d|�}|j�}d|_d|j|<|j|�|j
|j�|j||jv�y)Nrrcc��eZdZy)�GSpecificationTests.test_changed_clears_volatiles_and_implied.<locals>.INrr-rrr}r�r�rr}rr-)r!rdrM�_v_attrsr��changed�assertIsNoner�)r$rdr}ris    r�)test_changed_clears_volatiles_and_impliedz<SpecificationTests.test_changed_clears_volatiles_and_impliedsf��6�	�	�	��}�}�����
���
�
�a�����T�����$�-�-�(�����d�m�m�+�,rc��ddlm}Gd�d|�}|j||g�}|jt	|j��|g�y)Nrrcc��eZdZy)�CSpecificationTests.test_interfaces_skips_already_seen.<locals>.IFooNrr-rr�IFoor�r�rr�)r!rdrMr"rS�
interfaces�r$rdr�ris    r�"test_interfaces_skips_already_seenz5SpecificationTests.test_interfaces_skips_already_seensA��6�	�9�	��}�}�d�D�\�*������d�o�o�/�0�4�&�9rc��ddlm}Gd�d|�}|j|�}|j|j	|d���y)Nrrcc��eZdZy)�<SpecificationTests.test_extends_strict_wo_self.<locals>.IFooNrr-rrr�r�r�rr�T��strict)r!rdrMr��extendsr�s    r�test_extends_strict_wo_selfz.SpecificationTests.test_extends_strict_wo_selfs:��6�	�9�	��}�}�T�"��������d�4��8�9rc�h�|j�}|j|j|d���y)NTr�)rMr�r��r$ris  r�test_extends_strict_w_selfz-SpecificationTests.test_extends_strict_w_selfs(���}�}���������d�4��8�9rc�h�|j�}|j|j|d���y)NFr�)rMr�r�r�s  r�test_extends_non_strict_w_selfz1SpecificationTests.test_extends_non_strict_w_selfs&���}�}���������T�%��8�9rc��|j�}t�}d|i|_|j|j	d�|u�yr�)rMr�r�r�r�)r$rircs   r�test_get_hit_w__v_attrsz*SpecificationTests.test_get_hit_w__v_attrs"s8���}�}����h������
���������3�.�/rc�<��ddlm�ddlm}G�fd�d|�}G�fd�d|�}|j||g�}|j	|jd�|jd�u�|j	|jd	�|jd	�u�y)
Nr��	Attributercc� ��eZdZW�d�Zy)�CSpecificationTests.test_get_hit_from_base_wo__v_attrs.<locals>.IFoorcN)rrrrcr�s�rr�r�+�
����E�"�Crr�c� ��eZdZW�d�Zy)�CSpecificationTests.test_get_hit_from_base_wo__v_attrs.<locals>.IBarr5N�rrrr5r�s�r�IBarr�-r�rr�rcr5)r!r�rdrMr�r�)r$rdr�r�rir�s     @r�"test_get_hit_from_base_wo__v_attrsz5SpecificationTests.test_get_hit_from_base_wo__v_attrs(su���6�6�	#�9�	#�	#�9�	#��}�}�d�D�\�*����������4�8�8�E�?�:�;���������4�8�8�E�?�:�;rc
�H�ddlm}ddlm}ddlm}Gd�d|�}Gd�d�}Gd	�d
|�}Gd�d|�}||�Gd
�d��}Gd�d||�}	|j||	�j||	�||�|||�|t�|f�y)Nrrc��implementerr�c��eZdZy)�TSpecificationTests.test_multiple_inheritance_no_interfaces.<locals>.IDefaultViewNameNrr-rr�IDefaultViewNamer�=r�rr�c��eZdZy)�KSpecificationTests.test_multiple_inheritance_no_interfaces.<locals>.ContextNrr-rr�Contextr�@r�rr�c��eZdZy)�LSpecificationTests.test_multiple_inheritance_no_interfaces.<locals>.RDBModelNrr-rr�RDBModelr�Cr�rr�c��eZdZy)�JSpecificationTests.test_multiple_inheritance_no_interfaces.<locals>.IOtherNrr-rr�IOtherr�Fr�rr�c��eZdZy)�MSpecificationTests.test_multiple_inheritance_no_interfaces.<locals>.OtherBaseNrr-rr�	OtherBaser�I���rr�c��eZdZy)�ISpecificationTests.test_multiple_inheritance_no_interfaces.<locals>.ModelNrr-rr�Modelr�Mr�rr�)r!rdr�r�r�r"�__sro__r�)
r$rdr�r�r�r�r�r�r�r�s
          r�'test_multiple_inheritance_no_interfacesz:SpecificationTests.test_multiple_inheritance_no_interfaces3s���	7�;�=�	�y�	�	�	�	�w�	�	�Y�	�
�V�	�	�	�
�	�	�I�w�	�	
����%� �(�(��e�$��i�(���g�&��f�%��

�
	
rN)rrrrIr`rMrjrrrtrwryr�r�r�r�r�r�r�r�r�r-rrr\r\�sW���%�-�
2�2�2�;�
1�0� 	-�:�:�:�:�0�	<�'
rr\c�8�eZdZd�Z		d3d�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/�Z0d0�Z1d1�Z2d2�Z3y)4�InterfaceClassTestsc��ddlm}|S)Nr��InterfaceClass)r!r�)r$r�s  rrIz#InterfaceClassTests._getTargetClass_s��;��rNc�6�|j�|||||�Srr�)r$rLra�attrsrQrs      rrMzInterfaceClassTests._makeOnecs ��%�t�#�#�%�d�E�5�'�:�N�Nrc��|j�}|d�}|j|jd�|j|jd�|j|jd�|j|j�d�y)N�ITestingrOr-)rIr"rrQrf�getBases)r$�klass�insts   rrWz&InterfaceClassTests.test_ctor_defaultsgsl���$�$�&���Z� ��������
�3�������r�*��������,��������"�-rc�f�|j�}|jt|dt�f�y)Nr�)rIr]rr�)r$r�s  r�test_ctor_bad_basesz'InterfaceClassTests.test_ctor_bad_basesos(���$�$�&�����)�U�J����Drc�~�ddlm}ddlm}d�}|dd�||�d�}|j�}|d|�	�}|j	|j
d�|j	|jd�|j	|jd
�|j	|j�|j��y)Nrr���fromFunctionc��y��	DOCSTRINGNr-r-rr�_barzBInterfaceClassTests.test_ctor_w_attrs_attrib_methods.<locals>._barv��rrrO�rcr5r��r�r-)
r!r�r�rIr"rrQrf�names�keys)r$r�r�r��ATTRSr�r�s       r� test_ctor_w_attrs_attrib_methodsz4InterfaceClassTests.test_ctor_w_attrs_attrib_methodsss���6�9�	�!�%��,�$�T�*����$�$�&���Z�u�-��������
�3�������r�*��������,��������u�z�z�|�4rc�:�dii}|j�}|d|��}|j|jd�|j|jd�|j|jd�|jt|j
��g�y)N�
__locals__r�r�rOr-�rIr"rrQrfrSr��r$r�r�r�s    r�test_ctor_attrs_w___locals__z0InterfaceClassTests.test_ctor_attrs_w___locals__�s}���r�"���$�$�&���Z�u�-��������
�3�������r�*��������,�����d�j�j�l�+�R�0rc�:�dii}|j�}|d|��}|j|jd�|j|jd�|j|jd�|jt|j
��g�y)N�__annotations__r�r�rOr-r�r�s    r�!test_ctor_attrs_w___annotations__z5InterfaceClassTests.test_ctor_attrs_w___annotations__�s}��"�B�'���$�$�&���Z�u�-��������
�3�������r�*��������,�����d�j�j�l�+�R�0rc�F�ddlm}d|i}|j�}|d|��}|j|jd�|j|j
d�|j|jd�|jt|j��g�y)Nr)�_decorator_non_return�dropmer�r�rOr-)	r!r�rIr"rrQrfrSr�)r$r�r�r�r�s     r�'test_ctor_attrs_w__decorator_non_returnz;InterfaceClassTests.test_ctor_attrs_w__decorator_non_return�s���B��0�1���$�$�&���Z�u�-��������
�3�������r�*��������,�����d�j�j�l�+�R�0rc�r�ddlm}dt�i}|j�}|j	||d|��y)Nr)�InvalidInterface�invalidr�r�)�zope.interface.exceptionsr�r�rIr])r$r�r�r�s    r�#test_ctor_attrs_w_invalid_attr_typez7InterfaceClassTests.test_ctor_attrs_w_invalid_attr_type�s7��>��F�H�%���$�$�&�����*�E�:�U��Krc�z�ddi}|j�}|d|d��}|j|jd�y)NrQ�ATTRr��EXPLICIT)r�rQ)rIr"rQr�s    r�test_ctor_w_explicit___doc__z0InterfaceClassTests.test_ctor_w_explicit___doc__�s<���F�#���$�$�&���Z�u�j�A��������z�2rc�x�|j�}|jt|j��|g�yr)rMr"rSr�rIs  r�test_interfacesz#InterfaceClassTests.test_interfaces�s-���
�
�������e�.�.�0�1�E�7�;rc��|j�}|jd|f��}|j|j�|f�y�N�ISub)ra)rMr"r��r$r*�subs   r�
test_getBasesz!InterfaceClassTests.test_getBases�s9���
�
����m�m�F�5�(�m�3���������%��2rc�d�|j�}|j|j|��yr)rMr��isEqualOrExtendedByrIs  r�!test_isEqualOrExtendedBy_identityz5InterfaceClassTests.test_isEqualOrExtendedBy_identity�s$���
�
�������1�1�%�8�9rc���|j�}|jd|f��}|j|j|��|j|j|��yr�)rMr�r�r�r�s   r�!test_isEqualOrExtendedBy_subifacez5InterfaceClassTests.test_isEqualOrExtendedBy_subiface�sQ���
�
����m�m�F�5�(�m�3������1�1�#�6�7�����0�0��7�8rc���|jd�}|jd�}|j|j|��|j|j|��y)N�One�Another)rMr�r�)r$�one�anothers   r�"test_isEqualOrExtendedBy_unrelatedz6InterfaceClassTests.test_isEqualOrExtendedBy_unrelated�sP���m�m�E�"���-�-�	�*������0�0��9�:�����4�4�S�9�:rc��ddlm}ddlm}d�}|dd�||�d�}d|d	d�i}|jd
|��}|jd|f|�
�}|j	t|j
d���dg�y)Nrr�r�c��yr�r-r-rrr�zFInterfaceClassTests.test_names_w_all_False_ignores_bases.<locals>._bar�r�rrrOr�r6�Baz�IBaser��IDerived�rar�F��all�r!r�r�rMr"�sortedr��r$r�r�r��
BASE_ATTRS�
DERIVED_ATTRS�base�deriveds        r�$test_names_w_all_False_ignores_basesz8InterfaceClassTests.test_names_w_all_False_ignores_bases�s���6�9�	�&�u�b�1�)�$�/��
��	�%�� 4��
��}�}�W�J�}�7���-�-�
�4�'��-�O�������
�
�%�
� 8�9�E�7�Crc���ddlm}ddlm}d�}|dd�||�d�}|j|��}|j	t|j
d	�
��ddg�y)
Nrr�r�c��yr�r-r-rrr�z@InterfaceClassTests.test_names_w_all_True_no_bases.<locals>._bar�r�rrrOr�r�Tr
r5rcr�r$r�r�r�r�rs      r�test_names_w_all_True_no_basesz2InterfaceClassTests.test_names_w_all_True_no_bases�s\��6�9�	�!�%��,�$�T�*����m�m�%�m�(�������	�	�d�	� 3�4�u�e�n�Erc��ddlm}ddlm}d�}|dd�||�d�}d|d	d�i}|jd
|��}|jd|f|�
�}|j	t|j
d���gd��y)Nrr�r�c��yr�r-r-rrr�zFInterfaceClassTests.test_names_w_all_True_w_bases_simple.<locals>._bar�r�rrrOr�r6r	r
r�rrTr
�r5r6rcrrs        r�$test_names_w_all_True_w_bases_simplez8InterfaceClassTests.test_names_w_all_True_w_bases_simple�s���6�9�	�&�u�b�1�)�$�/��
��	�%�� 4��
��}�}�W�J�}�7���-�-�
�4�'��-�O�������
�
�$�
� 7�8�:O�Prc��ddlm}ddlm}d�}d�}|dd�||�d�}||�|d	d�d
�}|jd|��}|jd
|f|��}|j	t|j
d���gd��y)Nrr�r�c��yr�r-r-rrr�zJInterfaceClassTests.test_names_w_all_True_bases_w_same_names.<locals>._bar�r�rc��yr�r-r-rr�_foozJInterfaceClassTests.test_names_w_all_True_bases_w_same_names.<locals>._foo�r�rrrOr�r	�rcr6r
r�rrTr
rr�	r$r�r�r�r"rrrrs	         r�(test_names_w_all_True_bases_w_same_namesz<InterfaceClassTests.test_names_w_all_True_bases_w_same_names�s���6�9�	�	�&�u�b�1�)�$�/��
�!-�T� 2� )�%�� 4��
��}�}�W�J�}�7���-�-�
�4�'��-�O�������
�
�$�
� 7�8�:O�Prc��ddlm}ddlm}d�}d�}|dd�||�d�}||�|d	d�d
�}|jd|��}|jd
|f|��}|j	t|�gd��y)Nrr�r�c��yr�r-r-rrr�z/InterfaceClassTests.test___iter__.<locals>._bar�r�rc��yr�r-r-rrr"z/InterfaceClassTests.test___iter__.<locals>._foor�rrrOr�r	r#r
r�rrr)r!r�r�rMr"rr$s	         r�
test___iter__z!InterfaceClassTests.test___iter__�s���6�9�	�	�&�u�b�1�)�$�/��
�!-�T� 2� )�%�� 4��
��}�}�W�J�}�7���-�-�
�4�'��-�O��������*?�@rc��ddlm}ddlm}d�}|dd�||�d�}d|d	d�i}|jd
|��}|jd|f|�
�}|j	t|j
d���d|dfg�y)Nrr�r�c��yr�r-r-rrr�zUInterfaceClassTests.test_namesAndDescriptions_w_all_False_ignores_bases.<locals>._barr�rrrOr�r6r	r
r�rrFr
�r!r�r�rMr"r�namesAndDescriptionsrs        r�3test_namesAndDescriptions_w_all_False_ignores_baseszGInterfaceClassTests.test_namesAndDescriptions_w_all_False_ignores_basess���6�9�	�&�u�b�1�)�$�/��
��	�%�� 4��
��}�}�W�J�}�7���-�-�
�4�'��-�O������� <� <�� <� G�H� �-��"6�7��	rc���ddlm}ddlm}d�}|dd�||�d�}|j|��}|j	t|j
d	�
��d|dfd|dfg�y)
Nrr�r�c��yr�r-r-rrr�zOInterfaceClassTests.test_namesAndDescriptions_w_all_True_no_bases.<locals>._barr�rrrOr�r�Fr
r5rcr,rs      r�-test_namesAndDescriptions_w_all_True_no_baseszAInterfaceClassTests.test_namesAndDescriptions_w_all_True_no_basessx��6�9�	�!�%��,�$�T�*����m�m�%�m�(������� 8� 8�U� 8� C�D� �%��,�/� �%��,�/��	rc�&�ddlm}ddlm}d�}|dd�||�d�}d|d	d�i}|jd
|��}|jd|f|�
�}|j	t|j
d���d|dfd|dfd|dfg�y)Nrr�r�c��yr�r-r-rrr�zMInterfaceClassTests.test_namesAndDescriptions_w_all_True_simple.<locals>._bar-r�rrrOr�r6r	r
r�rrTr
r5rcr,rs        r�+test_namesAndDescriptions_w_all_True_simplez?InterfaceClassTests.test_namesAndDescriptions_w_all_True_simple*s���6�9�	�&�u�b�1�)�$�/��
��	�%�� 4��
��}�}�W�J�}�7���-�-�
�4�'��-�O������� <� <�� <� F�G� �*�U�"3�4� �-��"6�7� �*�U�"3�4��	rc�:�ddlm}ddlm}d�}d�}|dd�||�d�}||�|d	d�d
�}|jd|��}|jd
|f|��}|j	t|j
d���d|dfd|dfd|dfg�y)Nrr�r�c��yr�r-r-rrr�zYInterfaceClassTests.test_namesAndDescriptions_w_all_True_bases_w_same_names.<locals>._bar?r�rc��yr�r-r-rrr"zYInterfaceClassTests.test_namesAndDescriptions_w_all_True_bases_w_same_names.<locals>._fooAr�rrrOr�r	r#r
r�rrTr
r5r6rcr,r$s	         r�7test_namesAndDescriptions_w_all_True_bases_w_same_nameszKInterfaceClassTests.test_namesAndDescriptions_w_all_True_bases_w_same_names<s���6�9�	�	�&�u�b�1�)�$�/��
�!-�T� 2� )�%�� 4��
��}�}�W�J�}�7���-�-�
�4�'��-�O������� <� <�� <� F�G� �*�U�"3�4� �-��"6�7� �-��"6�7��	rc�f�|j�}|jt|jd�yr[)rMr]r^�getDescriptionFor�r$rs  r�test_getDescriptionFor_missz/InterfaceClassTests.test_getDescriptionFor_missQs%���m�m�o�����(�C�$9�$9�:�Frc��ddlm}ddlm}d�}|dd�||�d�}|j|��}|j	|jd	�|d	�|j	|jd
�|d
�y)Nrr�r�c��yr�r-r-rrr�z<InterfaceClassTests.test_getDescriptionFor_hit.<locals>._barXr�rrrOr�r�rcr5)r!r�r�rMr"r:rs      r�test_getDescriptionFor_hitz.InterfaceClassTests.test_getDescriptionFor_hitUsv��6�9�	�!�%��,�$�T�*����m�m�%�m�(������.�.�u�5�u�U�|�D�����.�.�u�5�u�U�|�Drc�\��|j���fd�}|jt|�y)Nc����dSr[r-)rs�r�_testz8InterfaceClassTests.test___getitem___miss.<locals>._testcs
����z�?�"r)rMr]r^)r$rBrs  @r�test___getitem___missz)InterfaceClassTests.test___getitem___missas#����m�m�o��	#����(�E�*rc���ddlm}ddlm}d�}|dd�||�d�}|j|��}|j	|d	|d	�|j	|d
|d
�y)Nrr�r�c��yr�r-r-rrr�z6InterfaceClassTests.test___getitem___hit.<locals>._barjr�rrrOr�r�rcr5)r!r�r�rMr"rs      r�test___getitem___hitz(InterfaceClassTests.test___getitem___hitgsh��6�9�	�!�%��,�$�T�*����m�m�%�m�(������U��U�5�\�2�����U��U�5�\�2rc�J�|j�}|jd|v�yr[)rMr�r;s  r�test___contains___missz*InterfaceClassTests.test___contains___missss ���m�m�o������s�*�+rc��ddlm}ddlm}d�}|dd�||�d�}|j|��}|j	d	|v�|j	d
|v�y)Nrr�r�c��yr�r-r-rrr�z7InterfaceClassTests.test___contains___hit.<locals>._barzr�rrrOr�r�rcr5)r!r�r�rMr�rs      r�test___contains___hitz)InterfaceClassTests.test___contains___hitwsX��6�9�	�!�%��,�$�T�*����m�m�%�m�(��������%�������%rc�f�|j�}|j|jd�d�yr[)rMr"�directr;s  r�test_direct_missz$InterfaceClassTests.test_direct_miss�s&���m�m�o��������J�/��6rc��ddlm}ddlm}d�}d�}|dd�||�d�}||�|d	d�d
�}|jd|��}|jd
|f|��}|j	|jd�|d�|j	|jd�|d�|j	|jd�d�y)Nrr�r�c��yr�r-r-rrr�zBInterfaceClassTests.test_direct_hit_local_miss_bases.<locals>._bar�r�rc��yr�r-r-rrr"zBInterfaceClassTests.test_direct_hit_local_miss_bases.<locals>._foo�r�rrrOr�r	r#r
r�rrrcr6r5)r!r�r�rMr"rMr$s	         r� test_direct_hit_local_miss_basesz4InterfaceClassTests.test_direct_hit_local_miss_bases�s���6�9�	�	�&�u�b�1�)�$�/��
�!-�T� 2� )�%�� 4��
��}�}�W�J�}�7���-�-�
�4�'��-�O���������.�
�e�0D�E��������.�
�e�0D�E��������.��5rc�f�|j�}|j|jd�d�yr[)rMr"�queryDescriptionForrIs  r�test_queryDescriptionFor_missz1InterfaceClassTests.test_queryDescriptionFor_miss�s(���
�
�������2�2�:�>��Erc��ddlm}d|dd�i}|j|��}|j|j	d�|d�y)Nrr��attr�Title�Descriptionr�)r�r�rMr"rT)r$r�r�r*s    r�test_queryDescriptionFor_hitz0InterfaceClassTests.test_queryDescriptionFor_hit�sE��,���7�M�:�;���
�
�E�
�*������2�2�6�:�E�&�M�Jrc����g��fd�}|j�}t�}|jd|g�|j|j	|�d�|j�|fifg�y)Nc�,���j||f�yr�rQ)rr�_called_withs  �r�	_passablezCInterfaceClassTests.test_validateInvariants_pass.<locals>._passable�s�������r�
�+�rr)rMr�rer"�validateInvariants)r$r^r*r�r]s    @r�test_validateInvariants_passz0InterfaceClassTests.test_validateInvariants_pass�sf�����	��
�
����h��
���\�I�;�7�����1�1�#�6��=�����#����~�6rc�"����ddlm�g��fd�}g���fd�}|j�}t�}|j	d||g�|j�|j|�|j�|fifg�|j�|fifg�y)Nr��Invalidc�,���j||f�yr�rQ�rr�_passable_called_withs  �rr^zTInterfaceClassTests.test_validateInvariants_fail_wo_errors_passed.<locals>._passable�����!�(�(�$���4�rc�.���j||f���rrQ�rrrc�_fail_called_withs  ��r�_failzPInterfaceClassTests.test_validateInvariants_fail_wo_errors_passed.<locals>._fail������$�$�d�B�Z�0��Mrr�r�rcrMr�rer]r_r")r$r^rkr*r�rcrjrfs     @@@r�-test_validateInvariants_fail_wo_errors_passedzAInterfaceClassTests.test_validateInvariants_fail_wo_errors_passed�s����5� "��	���	��
�
����h��
���\�I�u�+=�>����'�5�#;�#;�S�A����.�3�&�"���?����*�s�f�b�\�N�;rc�\���ddlm�g}g���fd�}|j�}t�}|j	d|g�|j�|j||�|j�|fifg�|jt|�d�|jt|d���y)Nrrbc�.���j||f���rrQris  ��rrkzOInterfaceClassTests.test_validateInvariants_fail_w_errors_passed.<locals>._fail�rlrrrm�r�rcrMr�rer]r_r"rgr��
isinstance)r$�_errorsrkr*r�rcrjs     @@r�,test_validateInvariants_fail_w_errors_passedz@InterfaceClassTests.test_validateInvariants_fail_w_errors_passed�s����5�����	��
�
����h��
���\�E�7�3����'�5�#;�#;�S�'�J����*�s�f�b�\�N�;�����W��q�)����
�7�1�:�w�7�8rc�n����ddlm�g��fd�}g���fd�}|jd�}|jd|f�}t�}|j	d|g�|j	d|g�|j�|j|�|j�|fifg�|j�|fifg�y)Nrrbc�,���j||f�yr�rQres  �rr^z\InterfaceClassTests.test_validateInvariants_fail_in_base_wo_errors_passed.<locals>._passable�rgrc�.���j||f���rrQris  ��rrkzXInterfaceClassTests.test_validateInvariants_fail_in_base_wo_errors_passed.<locals>._fail�rlrr
rrrm)	r$r^rkrrr�rcrjrfs	      @@@r�5test_validateInvariants_fail_in_base_wo_errors_passedzIInterfaceClassTests.test_validateInvariants_fail_in_base_wo_errors_passed�s����5� "��	���	��}�}�W�%���-�-�
�T�G�4���h�����L�5�'�2����|�i�[�9����'�7�#=�#=�s�C����.�3�&�"���?����*�s�f�b�\�N�;rc�����	�ddlm�g}g�	�	fd�}g���fd�}|jd�}|jd|f�}t�}|j	d|g�|j	d|g�|j�|j||�|j�	|fifg�|j�|fifg�|jt|�d�|jt|d���y)	Nrrbc�,���j||f�yr�rQres  �rr^z[InterfaceClassTests.test_validateInvariants_fail_in_base_w_errors_passed.<locals>._passable�rgrc�.���j||f���rrQris  ��rrkzWInterfaceClassTests.test_validateInvariants_fail_in_base_w_errors_passed.<locals>._fail�rlrr
rrrmrq)
r$rsr^rkrrr�rcrjrfs
       @@@r�4test_validateInvariants_fail_in_base_w_errors_passedzHInterfaceClassTests.test_validateInvariants_fail_in_base_w_errors_passed�s����5��� "��	���	��}�}�W�%���-�-�
�T�G�4���h�����L�5�'�2����|�i�[�9����'�7�#=�#=�s�G�L����.�3�&�"���?����*�s�f�b�\�N�;�����W��q�)����
�7�1�:�w�7�8rc����g��fd�}t�}|jd�}|jd|g�|jd|f�}|j|�|j	dt���y)Nc�,���j||f�yr�rQres  �rr^zbInterfaceClassTests.test_validateInvariants_inherited_not_called_multiple_times.<locals>._passable�rgrr
rrrm)r�rMrer_r"rg)r$r^r�rrrfs     @r�;test_validateInvariants_inherited_not_called_multiple_timeszOInterfaceClassTests.test_validateInvariants_inherited_not_called_multiple_times�sm��� "��	��h���}�}�W�%�����L�9�+�6��-�-�
�T�G�4���"�"�3�'�����C� 5�6�7rc�f�|jd�}|j|j�d�y)N�PickleMe)rMr"�
__reduce__rIs  r�test___reduce__z#InterfaceClassTests.test___reduce__s)���
�
�j�)������)�)�+�Z�8rc�n�|jd�}|jt|�td��y)N�HashMe)r�z#zope.interface.tests.test_interface)rMr"�hashrIs  r�test___hash___normalz(InterfaceClassTests.test___hash___normal
s4���
�
�h�'������e���G�H�	Irc��Gd�d|j��}|�}|jt�5t|�ddd�y#1swYyxYw)Nc��eZdZd�Zy)�IInterfaceClassTests.test___hash___missing_required_attrs.<locals>.Derivedc��yrr-r�s rr�zRInterfaceClassTests.test___hash___missing_required_attrs.<locals>.Derived.__init__s��rNr�r-rr�Derivedr�s��
rr�)rIr]r�r�)r$r�rs   r�$test___hash___missing_required_attrsz8InterfaceClassTests.test___hash___missing_required_attrssJ��	�d�*�*�,�	��)��
�
�
�~�
.�	���M�	�	�	�s�A�Ac��|j�}|j|dk�|j|dk�|j|dk(�|j|dk7�|j|dk\�|j|dkD�|jd|k�|jd|k�|jd|k(�|jd|k7�|jd|k\�|jd|kD�yr�rMr�r�rIs  r�test_comparison_with_Nonez-InterfaceClassTests.test_comparison_with_Nones����
�
���������%������
�&�����$��'������
�&�����$��'�������&�������&�������'�������'������
�&������
�&�����u��%rc��|j�}|j||k�|j||k�|j||k(�|j||k7�|j||k\�|j||kD�yr)rMr�r�rIs  r�"test_comparison_with_same_instancez6InterfaceClassTests.test_comparison_with_same_instance)ss���
�
���������'�������'�������'�����%��(�������'�������'rc�0�|jdd��}|jdd��}|j||k�|j||k�|j||k�|j||k�|j||k(�|j||k(�|j||k7�|j||k7�|j||k\�|j||k\�|j||kD�|j||kD�y)N�INamezzope.interface.tests.oner�zzope.interface.tests.otherr�)r$rr�s   r�8test_comparison_with_same_named_instance_in_other_modulezLInterfaceClassTests.test_comparison_with_same_named_instance_in_other_module4s����m�m�G�0J�m�K���
�
�g�2N�
�O������e��$�������%�����u��%�����#��&�������&�����#��&�����u��%�������%�������&�������%�����u��%�������$rc�6��Gd�dt��G�fd�d|j��}|jd�}|j||j��|j	t|�|j��|j
t�5|d�ddd�||_|j||�|j	t|�|�|j
��5|d�ddd�y#1swY�`xYw#1swYyxYw)Nc��eZdZy)�DInterfaceClassTests.test_assignment_to__class__.<locals>.MyExceptionNrr-rrr�r�Hr�rr�c���eZdZ�fd�Zy)�IInterfaceClassTests.test_assignment_to__class__.<locals>.MyInterfaceClassc����|��rr-)r$�targetr�s  �r�__call__zRInterfaceClassTests.test_assignment_to__class__.<locals>.MyInterfaceClass.__call__Ls���!�&�)�)rN�rrrr�)r�s�r�MyInterfaceClassr�Ks���
*rr�r�rm)	rrIrM�assertIsInstancer��typer]r�	__class__)r$r�r�r�s   @r�test_assignment_to__class__z/InterfaceClassTests.test_assignment_to__class__Fs����	�)�	�	*�t�3�3�5�	*��}�}�W�%�����d�D�$8�$8�$:�;��
�
�d�4�j�$�"6�"6�"8�9�
�
�
�y�
)�	���G�	�*������d�$4�5��
�
�d�4�j�"2�3�
�
�
�{�
+�	���G�	�	�	�	��	�	�s�	D�1	D�D�Dc��ddlm}Gd�d|j��}|d|f�}|j|d�d�Gd�d	|�}|j|d�d�Gd
�d|�}|j	t
�5|�ddd�||_|j|d�d�y#1swY�)xYw)Nrrcc��eZdZd�Zy)�JInterfaceClassTests.test_assignment_to__class__2.<locals>.MyInterfaceClassc��|Srr-)r$rs  rr�zSInterfaceClassTests.test_assignment_to__class__2.<locals>.MyInterfaceClass.__call__cs���rNr�r-rrr�r�brJrr�r�rm)rmc��eZdZy)�>InterfaceClassTests.test_assignment_to__class__2.<locals>.IBarNrr-rrr�r�ir�rr�c��eZdZy)�?InterfaceClassTests.test_assignment_to__class__2.<locals>.ISpamNrr-rr�ISpamr�nr�rr�)r�rdrIr"r]rr�)r$rdr�r�r�r�s      r�test_assignment_to__class__2z0InterfaceClassTests.test_assignment_to__class__2]s���	-�	�t�3�3�5�	� ����5������a��$�'�	�4�	�	
����a��$�'�	�I�	��
�
�y�
)�	��G�	�+�������q��4�(�		�	�s�B5�5B>c��|j�}|jt�5d|_ddd�y#1swYyxYw)Nzdifferent.module)rMr]r�r)r$r�s  r�test__module__is_readonlyz-InterfaceClassTests.test__module__is_readonlyws7���}�}���
�
�
�~�
.�	1�0�D�O�	1�	1�	1�s	�7�A)�ITestr-NNN)4rrrrIrMrWr�r�r�r�r�r�r�r�r�r�rrrrrr%r)r.r1r4r8r<r?rCrFrHrKrNrRrUrZr`rnrtrxr|rr�r�r�r�r�r�r�r�r�r-rrr�r�]s���DH� �O�.�E�
5�1�1�1�L�3�<�3�
:�9�;�D�	F�Q�Q�"A�"� ��$�*G�
E�+�
3�,�
&�7�6�&F�K�	7�<�"
9�<�&9�,8�9�I��&�"	(�%�$�.)�41rr�c�D�eZdZd�Zd�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�Z6y5)6�InterfaceTestsc�x��ddlm}ddlm�G�fd�d|�}|j|dj|u�y)Nrrcr�c� ��eZdZW�d�Zy)�<InterfaceTests.test_attributes_link_to_interface.<locals>.I1�My attrN)rrrrWr�s�r�I1r��s
����Y�'�Drr�rW)r�rdr�r�r�)r$rdr�r�s   @r�!test_attributes_link_to_interfacez0InterfaceTests.test_attributes_link_to_interfaces2���,�,�	(��	(�	
����6�
�,�,��2�3rc�f�ddlm}Gd�d|�}|j|dj|u�y)Nrrcc��eZdZd�Zy)�9InterfaceTests.test_methods_link_to_interface.<locals>.I1c��y�zA methodNr-)rcr5�bingos   r�methodz@InterfaceTests.test_methods_link_to_interface.<locals>.I1.method�r�rN�rrrr�r-rrr�r��s��
rr�r�)r�rdr�r�)r$rdr�s   r�test_methods_link_to_interfacez-InterfaceTests.test_methods_link_to_interface�s.��,�	��	�
	
����8��.�.�"�4�5rc����ddlm}ddlm}ddlm}Gd�d|��Gd�d|�}G�fd	�d
�}|�}|j	�j|��|j|j|��|j
���|j	�||�v�|j|||�v�|j	�||�v�|j|||�v�y)Nrrcr�r�c��eZdZd�Zd�Zy)�<InterfaceTests.test_classImplements_simple.<locals>.ICurrentc��y��	docstringNr-�r�r�s  r�method1zDInterfaceTests.test_classImplements_simple.<locals>.ICurrent.method1�r�rc��yr�r-r�s  r�method2zDInterfaceTests.test_classImplements_simple.<locals>.ICurrent.method2�r�rN)rrrr�r�r-rr�ICurrentr��s��
 �
 rr�c��eZdZy)�:InterfaceTests.test_classImplements_simple.<locals>.IOtherNrr-rrr�r��r�rr�c� ��eZdZW�Zd�Zd�Zy)�;InterfaceTests.test_classImplements_simple.<locals>.Currentc��t��rr�r$r�r�s   rr�zCInterfaceTests.test_classImplements_simple.<locals>.Current.method1����)�+�+rc��t��rrr�s   rr�zCInterfaceTests.test_classImplements_simple.<locals>.Current.method2�r�rN)rrr�__implemented__r�r�)r�s�r�Currentr��s���&�O�
,�
,rr�)r�rdr�r�r�r�r")r$rdr�r�r�r��currentr�s       @r�test_classImplements_simplez*InterfaceTests.test_classImplements_simple�s����,�0�-�	 �y�	 �	�Y�	�	,�	,��)������.�.�w�7�8�����-�-�g�6�7�����8�,�����M�'�$:�:�;�����=��#9�9�:�����J�w�$7�7�8�����:�g�#6�6�7rc����ddlm}ddlm}ddlm}Gd�d|��Gd�d��}G�fd	�d
�}|�}|j	�j|��|j|j|��|j	�||�v�|j|||�v�|j	�||�v�|j|||�v�y)Nrrcr�r�c��eZdZd�Zy)�CInterfaceTests.test_classImplements_base_not_derived.<locals>.IBasec��yr�r-r-rrr�zJInterfaceTests.test_classImplements_base_not_derived.<locals>.IBase.method�r�rNr�r-rrr
r�����
 rr
c��eZdZy)�FInterfaceTests.test_classImplements_base_not_derived.<locals>.IDerivedNrr-rrrr��r�rrc���eZdZW�Zd�Zy)�EInterfaceTests.test_classImplements_base_not_derived.<locals>.Currentc��t��rrr�s rr�zLInterfaceTests.test_classImplements_base_not_derived.<locals>.Current.method�r�rN�rrrr�r�)r
s�rr�r��s
���#�O�
,rr��r�rdr�r�r�r�)r$rdr�r�rr�r�r
s       @r�%test_classImplements_base_not_derivedz4InterfaceTests.test_classImplements_base_not_derived�s����,�0�-�	 �I�	 �	�u�	�	,�	,��)������+�+�G�4�5�����/�/��8�9������w�!7�7�8�����]�7�%;�;�<������G�!4�4�5�����Z��%8�8�9rc�`��ddlm}ddlm}ddlm}Gd�d|�}Gd�d|��G�fd	�d
�}|�}|j	|j|��|j	�j|��|j|||�v�|j	|||�j
�v�|j	�||�v�|j|||�v�|j	|||�j
�v�|j	�||�v�y)Nrrcr�r�c��eZdZd�Zy)�CInterfaceTests.test_classImplements_base_and_derived.<locals>.IBasec��yr�r-r-rrr�zJInterfaceTests.test_classImplements_base_and_derived.<locals>.IBase.method�r�rNr�r-rrr
r��r�rr
c��eZdZy)�FInterfaceTests.test_classImplements_base_and_derived.<locals>.IDerivedNrr-rrrr��r�rrc���eZdZW�Zd�Zy)�EInterfaceTests.test_classImplements_base_and_derived.<locals>.Currentc��t��rrr�s rr�zLInterfaceTests.test_classImplements_base_and_derived.<locals>.Current.method�r�rNr�)rs�rr�r��s
���&�O�
,rr�)r�rdr�r�r�r��	flattened)r$rdr�r�r
r�r�rs       @r�%test_classImplements_base_and_derivedz4InterfaceTests.test_classImplements_base_and_derived�s����,�0�-�	 �I�	 �	�u�	�	,�	,�
�)������+�+�G�4�5�����.�.�w�7�8�����-��"8�8�9������w�!7�!A�!A�!C�C�D�����M�'�$:�:�;�����*�W�"5�5�6������G�!4�!>�!>�!@�@�A�����J�w�$7�7�8rc���	�ddlm}ddlm}ddlm}Gd�d|��Gd�d���	G�fd	�d
�}G�	fd�d�}Gd
�d||�}|�}|j	�j|��|j	�	j|��|j	�||�v�|j	�	||�v�|j	�||�v�|j	�	||�v�y)Nrrcr�r�c��eZdZd�Zy)�;InterfaceTests.test_classImplements_multiple.<locals>.ILeftc��yr�r-r-rrr�zBInterfaceTests.test_classImplements_multiple.<locals>.ILeft.method�r�rNr�r-rr�ILeftr��r�rr�c��eZdZy)�<InterfaceTests.test_classImplements_multiple.<locals>.IRightNrr-rr�IRightr��r�rr�c���eZdZW�Zd�Zy)�:InterfaceTests.test_classImplements_multiple.<locals>.Leftc��t��rrr�s rr�zAInterfaceTests.test_classImplements_multiple.<locals>.Left.method�r�rNr��r�s�r�Leftr���
���#�O�
,rr�c���eZdZW�Zy)�;InterfaceTests.test_classImplements_multiple.<locals>.RightN�rrrr��r�s�r�Rightr�����$�Orrc��eZdZy)�:InterfaceTests.test_classImplements_multiple.<locals>.AmbiNrr-rr�Ambir�r�rr)r�rdr�r�r�)
r$rdr�r�r�rr�ambir�r�s
        @@r�test_classImplements_multiplez,InterfaceTests.test_classImplements_multiple�s����,�0�-�	 �I�	 �	�U�	�	,�	,�	%�	%�	�4��	��v������+�+�D�1�2�����,�,�T�2�3������t�!4�4�5�����-��"5�5�6������D�!1�1�2�����*�T�"2�2�3rc�����	�
��ddlm}ddlm}ddlm}Gd�d|��Gd�d���	Gd	�d
|��G�fd�d��
G�	fd
�d�}G�fd�d��G�
�fd�d�
|�}|�}|j	�j|��|j�	j|��|j	�j|��|j	�||�v�|j�	||�v�|j	�||�v�|j	�||�v�|j�	||�v�|j	�||�v�y)Nrrcr�r�c��eZdZd�Zy)�PInterfaceTests.test_classImplements_multiple_w_explict_implements.<locals>.ILeftc��yr�r-r-rrr�zWInterfaceTests.test_classImplements_multiple_w_explict_implements.<locals>.ILeft.methodr�rNr�r-rrr�r	s��
 rr�c��eZdZy)�QInterfaceTests.test_classImplements_multiple_w_explict_implements.<locals>.IRightNrr-rrr�rr�rr�c��eZdZy)�QInterfaceTests.test_classImplements_multiple_w_explict_implements.<locals>.IOtherNrr-rrr�rr�rr�c���eZdZW�Zd�Zy)�OInterfaceTests.test_classImplements_multiple_w_explict_implements.<locals>.Leftc��t��rrr�s rr�zVInterfaceTests.test_classImplements_multiple_w_explict_implements.<locals>.Left.methodr�rNr�r�s�rr�rr�rr�c���eZdZW�Zy)�PInterfaceTests.test_classImplements_multiple_w_explict_implements.<locals>.RightNrrs�rrrrrrc���eZdZW�Zy)�PInterfaceTests.test_classImplements_multiple_w_explict_implements.<locals>.OtherNr)r�s�r�Otherrrrrc�B��eZdZW�jW�jfZy)�PInterfaceTests.test_classImplements_multiple_w_explict_implements.<locals>.MixedNr)r�rs��r�Mixedr s���"�2�2�E�4I�4I�I�Orrr�)r$rdr�r�rr�mixedr�r�r�r�rs       @@@@@r�2test_classImplements_multiple_w_explict_implementszAInterfaceTests.test_classImplements_multiple_w_explict_implementss6���,�0�-�	 �I�	 �
	�U�	�	�Y�	�	,�	,�	%�	%�	%�	%�	J�D�%�	J��������+�+�E�2�3�����-�-�e�4�5�����,�,�U�3�4������u�!5�5�6�����=��#7�7�8�����-��"6�6�7������E�!2�2�3�����:�e�#4�4�5�����*�U�"3�3�4rc�2�ddlm}|j}|d�}|d|f�}|d�}|d||f�}|j|j	|��|j|j	|��|j|j	|��|j|j	|��|j|j	|��|j|j	|��|j|j	|��y)Nrrc�FunInterface�BarInterface�BobInterface�BazInterface)r�rdr�r�r�r�)r$rd�newr r!r"r#s       r�testInterfaceExtendsInterfacez,InterfaceTests.testInterfaceExtendsInterface/s���,��!�!���>�*���>�L�?�;���>�*���>�L�,�+H�I������,�,�\�:�;�����,�,�\�:�;�����,�,�\�:�;�����-�-�l�;�<�����-�-�l�;�<�����,�,�\�:�;�����-�-�l�;�<rc����ddlm�ddlm}ddlm}G�fd�d|��G�fd�d�}|j|�|��y)	Nrr�rc)�verifyClassc�&��eZdZW�d�Zd�Zy)�1InterfaceTests.test_verifyClass.<locals>.ICheckMer�c��yr�r-r-rrr�z8InterfaceTests.test_verifyClass.<locals>.ICheckMe.methodIr�rN�rrrrWr�r�s�r�ICheckMer)F�����Y�'�D�
rr,c���eZdZW�ZdZd�Zy)�0InterfaceTests.test_verifyClass.<locals>.CheckMe�valuec��t��rrr�s rr�z7InterfaceTests.test_verifyClass.<locals>.CheckMe.methodPr�rN�rrrr�rWr��r,s�r�CheckMer/L����&�O��D�
,rr4)r�r�rdr~r'r�)r$rdr'r4r�r,s    @@r�test_verifyClasszInterfaceTests.test_verifyClass@s7���,�,�5�	�y�	�	,�	,�	
����H�g�6�7rc����ddlm�ddlm}ddlm}G�fd�d|��G�fd�d�}|�}|j|�|��y)	Nrr�rcr{c�&��eZdZW�d�Zd�Zy)�2InterfaceTests.test_verifyObject.<locals>.ICheckMer�c��yr�r-r-rrr�z9InterfaceTests.test_verifyObject.<locals>.ICheckMe.method^r�rNr+r�s�rr,r9[r-rr,c���eZdZW�ZdZd�Zy)�1InterfaceTests.test_verifyObject.<locals>.CheckMer0c��t��rrr�s rr�z8InterfaceTests.test_verifyObject.<locals>.CheckMe.methoder�rNr2r3s�rr4r<ar5rr4)r�r�rdr~r|r�)r$rdr|r4�check_mer�r,s     @@r�test_verifyObjectz InterfaceTests.test_verifyObjectUs>���,�,�6�	�y�	�	,�	,��9������X�x�8�9rc�f�ddlm}Gd�d|�}|j|j|��y)Nrrcc��eZdZy)�LInterfaceTests.test_interface_object_provides_Interface.<locals>.AnInterfaceNrr-rr�AnInterfacerBor�rrC)r�rdr�r�)r$rdrCs   r�(test_interface_object_provides_Interfacez7InterfaceTests.test_interface_object_provides_Interfacels*��,�	�)�	�	
���	�,�,�[�9�:rc���ddlm�ddlm}G�fd�d|�}|jt	|j��ddg�y)Nrr�rcc�&��eZdZW�d�Zd�Zy)�1InterfaceTests.test_names_simple.<locals>.ISimpler�c��yr�r-r-rrr�z8InterfaceTests.test_names_simple.<locals>.ISimple.method|r�rNr+r�s�r�ISimplerGy�����Y�'�D�
 rrIrWr��r�r�rdr"rr��r$rdrIr�s   @r�test_names_simplez InterfaceTests.test_names_simplets7���,�,�	 �i�	 �	
�����
�
��0�6�8�2D�Erc���ddlm�ddlm}G�fd�d|�}G�fd�d|�}|jt	|j��gd��|jt	|jd	�
��gd��y)Nrr�rcc�&��eZdZW�d�Zd�Zy)�0InterfaceTests.test_names_derived.<locals>.IBaser�c��yr�r-r-rrr�z7InterfaceTests.test_names_derived.<locals>.IBase.method�r�rNr+r�s�rr
rP�rJrr
c�,��eZdZW�d�Zd�Zd�Zy)�3InterfaceTests.test_names_derived.<locals>.IDerived�My attr2c��yr�r-r-rrr�z:InterfaceTests.test_names_derived.<locals>.IDerived.method�r�rc��yr�r-r-rrr�z;InterfaceTests.test_names_derived.<locals>.IDerived.method2�r�rN�rrr�attr2r�r�r�s�rrrS�s����j�)�E�
 �
 rr)rXr�r�Tr
�rWrXr�r�rK�r$rdr
rr�s    @r�test_names_derivedz!InterfaceTests.test_names_derived�sf���,�,�	 �I�	 �	 �u�	 �	
������� 0�1�7�	9��������4�� 8�9�?�	Arc���ddlm�ddlm}ddlm}G�fd�d|�}t|j
��}|jt|�d�|j|ddd�|jt|dd	���|j|dd	jd�|j|dd	jd
�|j|d	dd�|jt|d	d	|��|j|d	d	jd�|j|d	d	jd�y)
Nrr���Methodrcc�&��eZdZW�d�Zd�Zy)�@InterfaceTests.test_namesAndDescriptions_simple.<locals>.ISimpler�c��y��	My methodNr-r-rrr�zGInterfaceTests.test_namesAndDescriptions_simple.<locals>.ISimple.method�r�rNr+r�s�rrIr`������Y�'�D�
rrIrerWrmr�r�rc)
r�r�r!r^rdrr-r"rgr�rrrrQ)r$r^rdrI�name_valuesr�s     @r� test_namesAndDescriptions_simplez/InterfaceTests.test_namesAndDescriptions_simple�s(���,�3�,�	�i�	��W�9�9�;�<������[�)�1�-�����Q���*�F�3����
�;�q�>�!�#4�i�@�A�����Q���*�3�3�V�<�����Q���*�2�2�I�>�����Q���*�H�5����
�;�q�>�!�#4�f�=�>�����Q���*�3�3�X�>�����Q���*�2�2�K�@rc���ddlm�ddlm}ddlm}G�fd�d|�}G�fd�d|�}t|j
��}|jt|�d	�|j|ddd
�|jt|dd���|j|ddjd
�|j|ddjd�|j|ddd
�|jt|dd|��|j|ddjd
�|j|ddjd�|j|ddd�|jt|dd|��|j|ddjd�|j|ddjd�t|j
d���}|jt|�d�|j|ddd�|jt|dd���|j|ddjd�|j|ddjd�|j|ddd
�|jt|dd���|j|ddjd
�|j|ddjd�|j|ddd
�|jt|dd|��|j|ddjd
�|j|ddjd�|j|d	dd�|jt|d	d|��|j|d	djd�|j|d	djd�y)Nrr�rcr]c�&��eZdZW�d�Zd�Zy)�?InterfaceTests.test_namesAndDescriptions_derived.<locals>.IBaser�c��yrbr-r-rrr�zFInterfaceTests.test_namesAndDescriptions_derived.<locals>.IBase.method�r�rNr+r�s�rr
ri�rdrr
c�,��eZdZW�d�Zd�Zd�Zy)�BInterfaceTests.test_namesAndDescriptions_derived.<locals>.IDerivedrTc��y��My method, overriddenNr-r-rrr�zIInterfaceTests.test_namesAndDescriptions_derived.<locals>.IDerived.method�r�rc��y��
My method2Nr-r-rrr�zJInterfaceTests.test_namesAndDescriptions_derived.<locals>.IDerived.method2�r�rNrWr�s�rrrl������j�)�E�
(�
rr�rXrmrTr�rorer�rrTr
�rWr�)
r�r�rdr!r^rr-r"rgr�rrrrQ)r$rdr^r
rrer�s      @r�!test_namesAndDescriptions_derivedz0InterfaceTests.test_namesAndDescriptions_derived�s����,�,�3�	�I�	�	�u�	��X�:�:�<�=������[�)�1�-�����Q���*�G�4����
�;�q�>�!�#4�i�@�A�����Q���*�3�3�W�=�����Q���*�2�2�J�?�����Q���*�H�5����
�;�q�>�!�#4�f�=�>�����Q���*�3�3�X�>�����Q���*�2�2�4K�L�����Q���*�I�6����
�;�q�>�!�#4�f�=�>�����Q���*�3�3�Y�?�����Q���*�2�2�L�A��X�:�:�t�:�D�E������[�)�1�-�����Q���*�F�3����
�;�q�>�!�#4�i�@�A�����Q���*�3�3�V�<�����Q���*�2�2�I�>�����Q���*�G�4����
�;�q�>�!�#4�i�@�A�����Q���*�3�3�W�=�����Q���*�2�2�J�?�����Q���*�H�5����
�;�q�>�!�#4�f�=�>�����Q���*�3�3�X�>�����Q���*�2�2�4K�L�����Q���*�I�6����
�;�q�>�!�#4�f�=�>�����Q���*�3�3�Y�?�����Q���*�2�2�L�Arc�h�ddlm}Gd�d|�}|jt|jd�y)Nrrcc��eZdZy)�IInterfaceTests.test_getDescriptionFor_nonesuch_no_default.<locals>.IEmptyNrr-rr�IEmptyry�r�rrzr\)r�rdr]r^r:�r$rdrzs   r�*test_getDescriptionFor_nonesuch_no_defaultz9InterfaceTests.test_getDescriptionFor_nonesuch_no_default�s+��,�	�Y�	�	
���(�F�$<�$<�j�Irc����ddlm�ddlm}ddlm}G�fd�d|�}|jd�}|j
t|���|j|jd�|j|jd�|jd	�}|j
t||��|j|jd	�|j|jd
�y)Nrr�r]rcc�&��eZdZW�d�Zd�Zy)�=InterfaceTests.test_getDescriptionFor_simple.<locals>.ISimpler�c��yrbr-r-rrr�zDInterfaceTests.test_getDescriptionFor_simple.<locals>.ISimple.method�r�rNr+r�s�rrIr�rdrrIrWr�r�rc�r�r�r!r^rdr:r�rrr"rrQ�r$r^rdrI�a_desc�m_descr�s      @r�test_getDescriptionFor_simplez,InterfaceTests.test_getDescriptionFor_simple�s����,�3�,�	�i�	��*�*�6�2�����
�6�9�5�6�������&�1��������3��*�*�8�4�����
�6�6�2�3�������(�3��������5rc�~�	�ddlm�	ddlm}ddlm}G�	fd�d|�}G�	fd�d|�}|jd	�}|j
t|�	��|j|jd	�|j|jd
�|jd�}|j
t||��|j|jd�|j|jd�|jd
�}|j
t|�	��|j|jd
�|j|jd�|jd�}|j
t||��|j|jd�|j|jd�y)Nrr�r]rcc�&��eZdZW�d�Zd�Zy)�<InterfaceTests.test_getDescriptionFor_derived.<locals>.IBaser�c��yrbr-r-rrr�zCInterfaceTests.test_getDescriptionFor_derived.<locals>.IBase.methodr�rNr+r�s�rr
r�rdrr
c�,��eZdZW�d�Zd�Zd�Zy)�?InterfaceTests.test_getDescriptionFor_derived.<locals>.IDerivedrTc��yrnr-r-rrr�zFInterfaceTests.test_getDescriptionFor_derived.<locals>.IDerived.methodr�rc��yrqr-r-rrr�zGInterfaceTests.test_getDescriptionFor_derived.<locals>.IDerived.method2r�rNrWr�s�rrr�rsrrrWr�r�rorXrTr�rrr��
r$r^rdr
rr�r��a2_desc�m2_descr�s
         @r�test_getDescriptionFor_derivedz-InterfaceTests.test_getDescriptionFor_derived	sW���,�3�,�	�I�	�	�u�	��+�+�F�3�����
�6�9�5�6�������&�1��������3��+�+�H�5�����
�6�6�2�3�������(�3�������)@�A��,�,�W�5�����
�7�I�6�7�����)�)�7�3�������*�5��,�,�Y�7�����
�7�F�3�4�����)�)�9�5�������,�7rc�h�ddlm}Gd�d|�}|jt|jd�y)Nrrcc��eZdZy)�7InterfaceTests.test___getitem__nonesuch.<locals>.IEmptyNrr-rrrzr�5r�rrzr\)r�rdr]r^�__getitem__r{s   r�test___getitem__nonesuchz'InterfaceTests.test___getitem__nonesuch2s+��,�	�Y�	�	
���(�F�$6�$6�
�Crc���ddlm�ddlm}ddlm}G�fd�d|�}|d}|jt
|���|j|jd�|j|jd�|d	}|jt
||��|j|jd	�|j|jd
�y)Nrr�r]rcc�&��eZdZW�d�Zd�Zy)�6InterfaceTests.test___getitem__simple.<locals>.ISimpler�c��yrbr-r-rrr�z=InterfaceTests.test___getitem__simple.<locals>.ISimple.methodCr�rNr+r�s�rrIr�@rdrrIrWr�r�rc�
r�r�r!r^rdr�rrr"rrQr�s      @r�test___getitem__simplez%InterfaceTests.test___getitem__simple:s����,�3�,�	�i�	��������
�6�9�5�6�������&�1��������3���"�����
�6�6�2�3�������(�3��������5rc��	�ddlm�	ddlm}ddlm}G�	fd�d|�}G�	fd�d|�}|d	}|jt
|�	��|j|jd	�|j|jd
�|d}|jt
||��|j|jd�|j|jd�|d
}|jt
|�	��|j|jd
�|j|jd�|d}|jt
||��|j|jd�|j|jd�y)Nrr�r]rcc�&��eZdZW�d�Zd�Zy)�6InterfaceTests.test___getitem___derived.<locals>.IBaser�c��yrbr-r-rrr�z=InterfaceTests.test___getitem___derived.<locals>.IBase.methodYr�rNr+r�s�rr
r�Vrdrr
c�,��eZdZW�d�Zd�Zd�Zy)�9InterfaceTests.test___getitem___derived.<locals>.IDerivedrTc��yrnr-r-rrr�z@InterfaceTests.test___getitem___derived.<locals>.IDerived.method_r�rc��yrqr-r-rrr�zAInterfaceTests.test___getitem___derived.<locals>.IDerived.method2br�rNrWr�s�rrr�\rsrrrWr�r�rorXrTr�rrr�r�s
         @r�test___getitem___derivedz'InterfaceTests.test___getitem___derivedPs?���,�3�,�	�I�	�	�u�	��&�!�����
�6�9�5�6�������&�1��������3��(�#�����
�6�6�2�3�������(�3�������)@�A��7�#�����
�7�I�6�7�����)�)�7�3�������*�5��9�%�����
�7�F�3�4�����)�)�9�5�������,�7rc�L�ddlm}Gd�d|�}|jd|v�y)Nrrcc��eZdZy)�8InterfaceTests.test___contains__nonesuch.<locals>.IEmptyNrr-rrrzr�|r�rrzr\)r�rdr�r{s   r�test___contains__nonesuchz(InterfaceTests.test___contains__nonesuchys&��,�	�Y�	�	
����v�-�.rc���ddlm�ddlm}G�fd�d|�}|jd|v�|jd|v�y)Nrr�rcc�&��eZdZW�d�Zd�Zy)�7InterfaceTests.test___contains__simple.<locals>.ISimpler�c��yrbr-r-rrr�z>InterfaceTests.test___contains__simple.<locals>.ISimple.method�r�rNr+r�s�rrIr��rdrrIrWr��r�r�rdr�rLs   @r�test___contains__simplez&InterfaceTests.test___contains__simple�s9���,�,�	�i�	�	
����'�)�*�����G�+�,rc����ddlm�ddlm}G�fd�d|�}G�fd�d|�}|jd|v�|jd	|v�|jd
|v�|jd|v�y)Nrr�rcc�&��eZdZW�d�Zd�Zy)�6InterfaceTests.test___contains__derived.<locals>.IBaser�c��yrbr-r-rrr�z=InterfaceTests.test___contains__derived.<locals>.IBase.method�r�rNr+r�s�rr
r��rdrr
c�,��eZdZW�d�Zd�Zd�Zy)�9InterfaceTests.test___contains__derived.<locals>.IDerivedrTc��yrnr-r-rrr�z@InterfaceTests.test___contains__derived.<locals>.IDerived.method�r�rc��yrqr-r-rrr�zAInterfaceTests.test___contains__derived.<locals>.IDerived.method2�r�rNrWr�s�rrr��rsrrrWr�rXr�r�rZs    @r�test___contains__derivedz'InterfaceTests.test___contains__derived�sg���,�,�	�I�	�	�u�	�	
����(�*�+�����H�,�-�����8�+�,����	�X�-�.rc�\�ddlm}Gd�d|�}|jt|�g�y)Nrrcc��eZdZy)�1InterfaceTests.test___iter__empty.<locals>.IEmptyNrr-rrrzr��r�rrz)r�rdr"rSr{s   r�test___iter__emptyz!InterfaceTests.test___iter__empty�s'��,�	�Y�	�	
����f��r�*rc���ddlm�ddlm}G�fd�d|�}|jt	t|��ddg�y)Nrr�rcc�&��eZdZW�d�Zd�Zy)�3InterfaceTests.test___iter__simple.<locals>.ISimpler�c��yrbr-r-rrr�z:InterfaceTests.test___iter__simple.<locals>.ISimple.method�r�rNr+r�s�rrIr��rdrrIrWr��r�r�rdr"rrSrLs   @r�test___iter__simplez"InterfaceTests.test___iter__simple�s5���,�,�	�i�	�	
�����W�
�.���0B�Crc���ddlm�ddlm}G�fd�d|�}G�fd�d|�}|jt	t|��gd��y)	Nrr�rcc�&��eZdZW�d�Zd�Zy)�2InterfaceTests.test___iter__derived.<locals>.IBaser�c��yrbr-r-rrr�z9InterfaceTests.test___iter__derived.<locals>.IBase.method�r�rNr+r�s�rr
r��rdrr
c�,��eZdZW�d�Zd�Zd�Zy)�5InterfaceTests.test___iter__derived.<locals>.IDerivedrTc��yrnr-r-rrr�z<InterfaceTests.test___iter__derived.<locals>.IDerived.method�r�rc��yrqr-r-rrr�z=InterfaceTests.test___iter__derived.<locals>.IDerived.method2�r�rNrWr�s�rrr��rsrrrYr�rZs    @r�test___iter__derivedz#InterfaceTests.test___iter__derived�s@���,�,�	�I�	�	�u�	�	
�����X��/�?�	Arc�r�ddlm}Gd�d|�}|d}|j|jd�d�y)Nrrcc� �eZdZd�Zde_y)�LInterfaceTests.test_function_attributes_become_tagged_values.<locals>.ITagMec��yr�r-r-rrr�zSInterfaceTests.test_function_attributes_become_tagged_values.<locals>.ITagMe.method�r�rrmN)rrrr��optionalr-rr�ITagMer��s��
 ��F�Orr�r�r�rm)r�rdr"r_)r$rdr�r�s    r�-test_function_attributes_become_tagged_valuesz<InterfaceTests.test_function_attributes_become_tagged_values�s8��,�	 �Y�	 �
��!������.�.�z�:�A�>rc��ddlm}Gd�d|�}|j|jd�|jt	|�g�y)Nrrcc��eZdZdZy)�@InterfaceTests.test___doc___non_element.<locals>.IHaveADocString�xxxN�rrrrQr-rr�IHaveADocStringr�����rr�r�)r�rdr"rQrS)r$rdr�s   r�test___doc___non_elementz'InterfaceTests.test___doc___non_element�s>��,�	�i�	�	
����0�0�%�8�����o�.��3rc���ddlm�ddlm}G�fd�d|�}|j|jd�|jt|�dg�y)Nrr�rcc�$��eZdZdZW�d�Zy)�?InterfaceTests.test___doc___as_element.<locals>.IHaveADocStringr��the docNr�r�s�rr�r��s�����	�*�Grr�rOrQ)r�r�rdr"rQrS)r$rdr�r�s   @r�test___doc___as_elementz&InterfaceTests.test___doc___as_element�sD���,�,�	+�i�	+�	
����0�0�"�5�����o�.���<rc���ddlm}|j||j|�g}	|j||�|j	d�|jt|�|�|D�cgc]}|jd��}}|j�|D]#}	|j|	|jd���%y#|$r)}|j|jd|�Yd}~��d}~wwxYwcc}w)Nrrbz&validateInvariants should always raise)
r�rcr]r_�failr"rrg�sort�pop)
r$�
has_invariant�	error_len�
error_msgsr*rc�e�error�msgs�msgs
          r�_errorsEqualzInterfaceTests._errorsEqual�s���5����'�5�#;�#;�]�K���	/��$�$�]�A�6��I�I�>�?�	
����Q���+�+,�-�%��
�
�1�
�-��-��	�	���	5�C����S�*�.�.��"3�4�	5��
�	/����U�Z�Z��]�A�.�.��	/��.s�#B:�)C+�:C(�?C#�#C(c�����ddlm�ddlm}ddlm}ddlm�G��fd�d|�}Gd�d	�}|�}|||�|j|j
d
�tg�|j|j|�d�d|_	|j|j|�d�d|_
|j|j|�d�|`	|j|d
dg|�y)Nrr�rc��directlyProvidesr	c�D��eZdZW�d�ZW�d�ZW�e�y)�8InterfaceTests.test_invariant_simple.<locals>.IInvariantrc�*bar; must eval to Boolean True if foo doesN�rrrrcr5�
_ifFooThenBar�r�r
s��r�
IInvariantr�	� ����E�"�C��H�I�C��m�$rr�c��eZdZy)�:InterfaceTests.test_invariant_simple.<locals>.HasInvariantNrr-rr�HasInvariantr�r�rr�r��*rm�If Foo, then Bar!)r�r�rdr�r
r"r_r�r_r5rcr�)r$rdr�r�r�r�r�r
s      @@r�test_invariant_simplez$InterfaceTests.test_invariant_simples����,�,�3�,�	%��	%�
	�	�%��
���
�3�	
����2�2�<�@�'��	*�����6�6�}�E�t�L��
������6�6�}�E�t�L��
������6�6�}�E�t�L������-��-@�,A�$�	&rc����ddlm�ddlm}ddlm}ddlm�G��fd�d|�}G�fd�d	|�}Gd
�d�}|j|j
d�tg�|�}|||�d
|_|j|ddg|�d|_d|_
|j|ddg|�d|_d|_
|j|dddg|�d|_d|_
|j|j|�d�y)Nrr�rcr�r	c�D��eZdZW�d�ZW�d�ZW�e�y)�8InterfaceTests.test_invariant_nested.<locals>.IInvariantrcr�Nr�r�s��rr�r'r�rr�c� ��eZdZW�e�y)�;InterfaceTests.test_invariant_nested.<locals>.ISubInvariantN)rrr�_barGreaterThanFoor	s�r�
ISubInvariantr,s����(�)rrc��eZdZy)�:InterfaceTests.test_invariant_nested.<locals>.HasInvariantNrr-rrr�r/r�rr�rr�rmr�re�%Please, Boo MUST be greater than Foo!)r�r�rdr�r
r"r_rrcr�r5r_)	r$rdr�r�rr�r�r�r
s	       @@r�test_invariant_nestedz$InterfaceTests.test_invariant_nested!s���,�,�3�,�	%��	%�
	*�J�	*�	�	�	
����5�5�l�C�,�-�	/�$��
���
�6��
��	
���-��-@�,A�'�	)��
���
�����-��B�C�'�	)�
�
���
�����-��.�B�D�'�	)�
�
���
������6�6�}�E�t�Lrc�J��	�ddlm�ddlm}ddlm}ddlm�	G��	fd�d|�}Gd�d	�}|�}|||�d
|_|j
d�}|dd}|jt�|jd|�|j|dd
g|�d|_d|_|j|ddg|�d|_d|_|j|dd
dg|�d|_d|_|j|j|�d�|jd|�y)Nrr�rcr�r	c�D��eZdZW�d�ZW�d�ZW�e�y)�:InterfaceTests.test_invariant_mutandis.<locals>.IInvariantrcr�Nr�r�s��rr�rVr�rr�c��eZdZy)�<InterfaceTests.test_invariant_mutandis.<locals>.HasInvariantNrr-rrr�r
[r�rr�r�rrmr�rer)r�r�rdr�r
rcr_rRrrer�r5r"r_)
r$rdr�r�r�r��old_invariantsrr�r
s
        @@r�test_invariant_mutandisz&InterfaceTests.test_invariant_mutandisPs5���,�,�3�,�	%��	%�
	�	�%��
���
�3��
��$�2�2�<�@��#�A�&�
����,�-��!�!�,�
�;�	
���-��-@�,A�$�	&��
���
�����-��B�C�Z�	Q��
���
�����-��.�B�D�$�	&�
�
���
������6�6�}�E�t�L��!�!�,��?rc�,��ddlm}ddlm�Gd�d|�}|j|jd�|jt|�g�G�fd�d|�}|j|jd	�|jt|�d
g�y)Nrrcr�c��eZdZdZy)�7InterfaceTests.test___doc___element.<locals>.IDocstringr�Nr�r-rr�
IDocstringr�r�rrr�c�$��eZdZdZW�d�Zy)�CInterfaceTests.test___doc___element.<locals>.IDocstringAndAttributer�r�Nr�r�s�r�IDocstringAndAttributer�s�����	�*�GrrrOrQ)r�rdr�r"rQrS)r$rdrrr�s    @r�test___doc___elementz#InterfaceTests.test___doc___element�s���,�,�	��	�	
����+�+�U�3�����j�)�2�.�	+�Y�	+�
	
���/�7�7��<�����4�5�	�{�Crc�z����ddlm}ddlm�ddlm}ddlm�ddlm�G���fd�d|�}||�Gd	�d
��}|j|dd��|j|dd��	|j|dd��y#�$r%}|jt|�d
�Yd}~yd}~wwxYw)Nrrcr�r�r	rbc�H��eZdZW�d�ZW�d�ZW��fd��Zy)�:InterfaceTests.test_invariant_as_decorator.<locals>.IRangezLower boundzUpper boundc�H��|j|jkr�d��y)N�	max < min)�max�min)�obrcs �r�range_invariantzJInterfaceTests.test_invariant_as_decorator.<locals>.IRange.range_invariant�s"����6�6�B�F�F�?�!�+�.�.�#rN)rrrrrr )r�rcr
s���r�IRanger�s)����M�*�C��M�*�C�
�
/��
/rr!c��eZdZd�Zy)�9InterfaceTests.test_invariant_as_decorator.<locals>.Rangec�"�||c|_|_yr)rr)r$rrs   rr�zBInterfaceTests.test_invariant_as_decorator.<locals>.Range.__init__�s��%(�#�"���$�(rNr�r-rr�Ranger#�s��
.rr%rmrer)
r�rdr�r�r
r�rcr_r"r7)	r$rdr�r!r%r�r�rcr
s	      @@@r�test_invariant_as_decoratorz*InterfaceTests.test_invariant_as_decorator�s����,�,�.�,�5�	/�	/�Y�	/�
�V�	�	.�	.�
�	.�
	�!�!�%��1�+�.��!�!�%��1�+�.�	2��%�%�e�A�q�k�2���	2����S��V�[�1�1��	2�s�7B�B:�B5�5B:c�*���ddlm�ddlm}ddlm�G��fd�d|�}G�fd�d|�}Gd	�d
|�}|j	|jd�d�|j
t|j
d
�|j	t|j��dg�|j	|jd�d�|j	|jd
�d�|j	t|j��dd
h�y)Nrr�rcr1c�F��eZdZW�d�ZW�d�ZW�dd�y)�0InterfaceTests.test_taggedValue.<locals>.ITaggedrcr�r<�SpamN)rrrrcr5�r�r2s��r�ITaggedr)�s"����E�"�C��H�I�C���v�&rr,c�6��eZdZW�dd�W�dd�y)�1InterfaceTests.test_taggedValue.<locals>.IDerivedr<�	Spam Spamrcr5Nrr1s�rrr.�s�����{�+���u�%rrc��eZdZy)�2InterfaceTests.test_taggedValue.<locals>.IDerived2Nrr-rr�	IDerived2r1�r�rr2r<r*rcr/r5)r�r�rdr2r"r_r]r^rSrT�set)r$rdr,rr2r�r2s     @@r�test_taggedValuezInterfaceTests.test_taggedValue�s����,�,�.�	'�i�	'�
	&�w�	&�	��	�	
����/�/��6��?����(�G�$:�$:�E�B�����g�8�8�:�;�e�W�E�����1�1�%�8�+�F�����1�1�%�8�%�@�����Y�9�9�;�<�u�e�n�Mrc���	�
�ddlm�
ddlm�	|}G�	�
fd�d|�}G�	�
fd�d|�}G�	�
fd�d	|�}G�	�
fd
�d||�}Gd�d
||�}Gd�d||�}|S)Nrr1r�c�4��eZdZW�dd�W�d�Zy)�0InterfaceTests._make_taggedValue_tree.<locals>.F�tag�FN�rrrr8r+s��rr9r7�������s�#��C�.�Crr9c�4��eZdZW�dd�W�d�Zy)�0InterfaceTests._make_taggedValue_tree.<locals>.Er8�ENr:r+s��rr>r=�r;rr>c�4��eZdZW�dd�W�d�Zy)�0InterfaceTests._make_taggedValue_tree.<locals>.Dr8�DNr:r+s��rrAr@�r;rrAc�4��eZdZW�dd�W�d�Zy)�0InterfaceTests._make_taggedValue_tree.<locals>.Cr8�CNr:r+s��rrDrC�r;rrDc��eZdZy)�0InterfaceTests._make_taggedValue_tree.<locals>.BNrr-rr�BrF�r�rrGc��eZdZy)�0InterfaceTests._make_taggedValue_tree.<locals>.ANrr-rr�ArI�r�rrJ)r�r2r�)r$r�Or9r>rArDrGrJr�r2s         @@r�_make_taggedValue_treez%InterfaceTests._make_taggedValue_tree�sc���.�,���	!��	!�	!��	!�	!��	!�	!��1�	!�	��1�	�	��1�	��rc�&�ddlm}|jt�}|j	|j
jd�|j|�}|j	|djd�|j	|jd�d�|j	|jd�d�|jdjdk(sJ�|jdjdd�|j	|jd�d�y)NrrcrDr8rG)r�rdrLr�r"r8rr_rirfre)r$rd�class_A�iface_As    r�"test_getTaggedValue_follows__iro__z1InterfaceTests.test_getTaggedValue_follows__iro__�s���	-��-�-�f�5��������-�-�s�3��-�-�i�8��������0�0�#�6�����/�/��6��<�����1�1�%�8�#�>�� � ��#�,�,��3�3�3����!��+�+�E�3�7�����/�/��6��<rc�j�ddlm}|j|�}|j|j	d��|jgt
|j���|jt�5|jd�ddd�|jdd�|j|j	d�d�|j|jd�d�|jdgt
|j���|jdjdk(sJ�|jd}|j|j	d�d�|j|jd�d�|jdgt
|j���y#1swY��"xYw)Nrrcr8rJrmrD)r�rdrLr�rsr"rSrdr]r^rorerfr)r$rdrJrDs    r�(test_getDirectTaggedValue_ignores__iro__z7InterfaceTests.test_getDirectTaggedValue_ignores__iro__�sd��,��'�'�	�2�����!�2�2�5�9�:�����T�!�"<�"<�">�?�@�
�
�
�x�
(�	*�
�"�"�5�)�	*�	
�����$�����1�1�%�8�#�>�����/�/��6��<����%��$�q�'A�'A�'C�"D�E��{�{�1�~�&�&�#�-�-�-�
�K�K��N������1�1�%�8�#�>�����/�/��6��<����%��$�q�'A�'A�'C�"D�E�	*�	*�s�6F(�(F2c���ddlm}ddlm�G�fd�d|�}Gd�d|�}Gd�d	|�}|j|j	d
�|j	d
�u�|f|_|j|j	d
�du�y)Nrrcr�c� ��eZdZW�d�Zy)�<InterfaceTests.test_description_cache_management.<locals>.I1r�N)rrrr�r�s�rr�rUs����#��Arr�c��eZdZy)�<InterfaceTests.test_description_cache_management.<locals>.I2Nrr-rr�I2rWr�rrXc��eZdZy)�<InterfaceTests.test_description_cache_management.<locals>.I3Nrr-rr�I3rZr�rr[r�)r�rdr�r�r�rf)r$rdr�rXr[r�s     @r�!test_description_cache_managementz0InterfaceTests.test_description_cache_managementst���	-�,�	��	�	��	�	��	�	
������s��r�v�v�c�{�2�3�!�|���������s��t�+�,rc��ddlm}ddlm}Gd�d|�}||�Gd�d��}|j||��d�y)Nrrcr�c��eZdZy)�>InterfaceTests.test___call___defers_to___conform___.<locals>.INrr-rrr}r_'r�rr}c��eZdZd�Zy)�>InterfaceTests.test___call___defers_to___conform___.<locals>.Cc��y)Nrr-)r$�protos  rr,zJInterfaceTests.test___call___defers_to___conform___.<locals>.C.__conform__,s��rNr-r-rrrDra*s��
rrD)r�rdr�r")r$rdr�r}rDs     r�$test___call___defers_to___conform___z3InterfaceTests.test___call___defers_to___conform___#sI��,�.�	�	�	�
�Q��	�	�
�	�	
����1�3���#rc��ddlm}ddlm}Gd�d|�}||�Gd�d��}|�}|j||�|u�y)Nrrcr�c��eZdZy)�9InterfaceTests.test___call___object_implements.<locals>.INrr-rrr}rg5r�rr}c��eZdZy)�9InterfaceTests.test___call___object_implements.<locals>.CNrr-rrrDri8r�rrD)r�rdr�r�)r$rdr�r}rD�cs      r�test___call___object_implementsz.InterfaceTests.test___call___object_implements1sN��,�.�	�	�	�
�Q��	�	�
�	�
�C������!���	�"rc�v�ddlm}Gd�d|�}Gd�d�}|�}|jt||�y)Nrrcc��eZdZy)�9InterfaceTests.test___call___miss_wo_alternate.<locals>.INrr-rrr}rnBr�rr}c��eZdZy)�9InterfaceTests.test___call___miss_wo_alternate.<locals>.CNrr-rrrDrpEr�rrD)r�rdr]r�r$rdr}rDrjs     r�test___call___miss_wo_alternatez.InterfaceTests.test___call___miss_wo_alternate?s6��,�	�	�	�	�	�
�C�����)�Q��*rc�|�ddlm}Gd�d|�}Gd�d�}|�}|j|||�|u�y)Nrrcc��eZdZy)�8InterfaceTests.test___call___miss_w_alternate.<locals>.INrr-rrr}ruNr�rr}c��eZdZy)�8InterfaceTests.test___call___miss_w_alternate.<locals>.CNrr-rrrDrwQr�rrD)r�rdr�rqs     r�test___call___miss_w_alternatez-InterfaceTests.test___call___miss_w_alternateKs;��,�	�	�	�	�	�
�C������!�T�
�d�*�+rc����ddlm}ddlm}d�}�fd�}Gd�d|�}Gd�d	�}|�}|dd}||g|dd	�j	||��u�||ddy#||ddwxYw)
NrrcrXc��yrr-rVs  r�_missz:InterfaceTests.test___call___w_adapter_hook.<locals>._miss[s��rc����Srr-)r*r�r$s  �r�_hitz9InterfaceTests.test___call___w_adapter_hook.<locals>._hit^s����Krc��eZdZy)�6InterfaceTests.test___call___w_adapter_hook.<locals>.INrr-rrr}rar�rr}c��eZdZy)�6InterfaceTests.test___call___w_adapter_hook.<locals>.CNrr-rrrDr�dr�rrD)r�rdr!rYr�)	r$rdrYr{r}r}rDrj�old_adapter_hookss	`        r�test___call___w_adapter_hookz+InterfaceTests.test___call___w_adapter_hookWsz���,�:�	�	�	�	�	�	�	�
�C��)�!�,��!�4�=�
�a��	1��O�O�A�a�D�D�L�)�0�M�!���0�M�!��s�A�A%c����ddlm}ddlm�ddlm}G�fd�d|�}||�Gd�d��}|j	d	|t���|j	d	||���y)
Nrrc��interfacemethodr�c� ��eZdZW�d��Zy)�:InterfaceTests.test___call___w_overridden_adapt.<locals>.Ic��y�Nr�r-�r$r�s  rrMzDInterfaceTests.test___call___w_overridden_adapt.<locals>.I.__adapt__w���rN�rrrrMr�s�rr}r�us���
�
��
rr}c��eZdZy)�:InterfaceTests.test___call___w_overridden_adapt.<locals>.ONrr-rrrKr�{r�rrKr�)r�rdr�r�r"r�)r$rdr�r}rKr�s     @r� test___call___w_overridden_adaptz/InterfaceTests.test___call___w_overridden_adaptpse���,�2�.�	�	�	�
�Q��	�	�
�	�	
����Q�v�x�[�)�	
����Q�q�s�V�$rc�
��ddlm}ddlm�ddlm}G�fd�d|�}Gd�d|�}||�Gd	�d
��}||�Gd�d��}|j	d
|t���|j	d||���|j	d||���|j
t�5||��ddd�|j	d
||���y#1swY�'xYw)Nrrcr�r�c� ��eZdZW�d��Zy)�KInterfaceTests.test___call___w_overridden_adapt_and_conform.<locals>.IAdaptc��yr�r-r�s  rrMzUInterfaceTests.test___call___w_overridden_adapt_and_conform.<locals>.IAdapt.__adapt__�r�rNr�r�s�r�IAdaptr������
�
��
rr�c��eZdZdZy)�LInterfaceTests.test___call___w_overridden_adapt_and_conform.<locals>.ISimplezNothing special.Nr�r-rrrIr��s��"rrIc��eZdZd�Zy)�NInterfaceTests.test___call___w_overridden_adapt_and_conform.<locals>.Conform24c��y�N�r-rIs  rr,zZInterfaceTests.test___call___w_overridden_adapt_and_conform.<locals>.Conform24.__conform__�s��rNr-r-rr�	Conform24r��s��
rr�c��eZdZd�Zy)�PInterfaceTests.test___call___w_overridden_adapt_and_conform.<locals>.ConformNonec��yrr-rIs  rr,z\InterfaceTests.test___call___w_overridden_adapt_and_conform.<locals>.ConformNone.__conform__�r�rNr-r-rr�ConformNoner��s��
rr�r�r�)r�rdr�r�r"r�r]r)r$rdr�r�rIr�r�r�s       @r�,test___call___w_overridden_adapt_and_conformz;InterfaceTests.test___call___w_overridden_adapt_and_conform�s����	-�2�.�	�Y�	�
	#�i�	#�
�V�	�	�	�
�	�
�V�	�	�	�
�	�	
����V�F�H�-�.�����W�Y�[�1�2�����V�I�K�0�1�
�
�
�y�
)�	#��K�M�"�	#�	
����V�K�M�2�3�	#�	#�s�C9�9Dc����ddl}ddlm}ddlm�ddlm}G�fd�d|�}||�Gd�d��}|jd	|t
���|�}|j|||��y)
Nrrcr�r�c�,���eZdZW��fd��Z�xZS)�EInterfaceTests.test___call___w_overridden_adapt_call_super.<locals>.Ic�F��|j|�syt�|�	|�Sr�)r��superrM)r$r�r�s  �rrMzOInterfaceTests.test___call___w_overridden_adapt_call_super.<locals>.I.__adapt__�s"������s�+���w�(��-�-r)rrrrM�
__classcell__)r�r�s@�rr}r��s���
�
.��
.rr}c��eZdZy)�EInterfaceTests.test___call___w_overridden_adapt_call_super.<locals>.ONrr-rrrKr��r�rrKr�)�sysr�rdr�r�r"r�r�)r$r�rdr�r}rK�or�s       @r�+test___call___w_overridden_adapt_call_superz:InterfaceTests.test___call___w_overridden_adapt_call_super�si����,�2�.�	.�	�	.�
�Q��	�	�
�	�	
����Q�v�x�[�)�
�C���
�
�a��1��rc���ddlm}ddlm�G�fd�d|�}|jd|t	���|j|dj�d�y)	Nrrcr�c�&��eZdZW�d��Zd�Zy)�EInterfaceTests.test___adapt___as_method_and_implementation.<locals>.Ic��yr�r-r�s  rrMzOInterfaceTests.test___adapt___as_method_and_implementation.<locals>.I.__adapt__�r�rc��y)zThis is a protocolNr-)�to_adapts rrMzOInterfaceTests.test___adapt___as_method_and_implementation.<locals>.I.__adapt__�r�rNr�r�s�rr}r��s���
�
��
�
%rr}r�rMz
(to_adapt))r�rdr�r"r��getSignatureString�r$rdr}r�s   @r�+test___adapt___as_method_and_implementationz:InterfaceTests.test___adapt___as_method_and_implementation�sJ���,�2�	%�	�	%�	
����Q�v�x�[�)�����;��:�:�<�l�Krc�&�	�ddlm}ddlm�	Gd�d|�}G�	fd�d|�}Gd�d	|�}Gd
�d|�}Gd�d
|||�}G�	fd�d|�}|jd|t	���|||||fD]"}|jt
|j��$|||fD]&}|jt|�t|���(|jt|�t|��|jt|�t|��|j|t|��|jd|t	���|jt|�t|��|j|t|��y)Nrrcr�c��eZdZdZy)�@InterfaceTests.test___adapt__inheritance_and_type.<locals>.IRoot�RootNr�r-rr�IRootr��s��rr�c� ��eZdZW�d��Zy)�EInterfaceTests.test___adapt__inheritance_and_type.<locals>.IWithAdaptc��yr�r-r�s  rrMzOInterfaceTests.test___adapt__inheritance_and_type.<locals>.IWithAdapt.__adapt__�r�rNr�r�s�r�
IWithAdaptr��r�rr�c��eZdZdZy)�AInterfaceTests.test___adapt__inheritance_and_type.<locals>.IOtherz
Second branchNr�r-rrr�r��s��rr�c��eZdZdZy)�EInterfaceTests.test___adapt__inheritance_and_type.<locals>.IUnrelated�	UnrelatedNr�r-rr�
IUnrelatedr��s��rr�c��eZdZdZy)�HInterfaceTests.test___adapt__inheritance_and_type.<locals>.IDerivedAdaptzInherits an adaptNr�r-rr�
IDerivedAdaptr��s��#rr�c�$��eZdZdZW�d��Zy)�IInterfaceTests.test___adapt__inheritance_and_type.<locals>.IDerived2Adaptz$Overrides an inherited custom adapt.c��yr�r-r�s  rrMzSInterfaceTests.test___adapt__inheritance_and_type.<locals>.IDerived2Adapt.__adapt__�r�rN)rrrrQrMr�s�r�IDerived2Adaptr��s���6�
�
��
rr�r�r�)
r�rdr�r"r�rrr��assertNotEqualr�)
r$rdr�r�r�r�r�r�r*r�s
         @r�"test___adapt__inheritance_and_typez1InterfaceTests.test___adapt__inheritance_and_type�s]���,�2�	�I�	�	��	�
	 �U�	 �	��	�	$�J�
�F�	$�	�]�	�	
����]�6�8�4�5��J��
�M�I�	9�E����X�u�'7�'7�8�	9��F�J�.�	;�E����T�%�[�$�y�/�:�	;�	
���D��O�T�*�-=�>�����j�)�4�
�+>�?����j�$�y�/�:�����^�F�H�5�6����D��0�$�}�2E�F����n�d�=�.A�Brc���ddlm}ddlm�G�fd�d|�}|j||�d�|j|j	�d�y)Nrrcr�c�2��eZdZW�d��ZW�d��Zy)�9InterfaceTests.test_interfacemethod_is_general.<locals>.Ic��y)zReplace an existing methodr�r-r�s  rr�zBInterfaceTests.test_interfacemethod_is_general.<locals>.I.__call__�s��rc��yr�r-r�s r�this_is_newzEInterfaceTests.test_interfacemethod_is_general.<locals>.I.this_is_new	r�rN)rrrr�r�r�s�rr}r��s)���
�
��
��
��
rr}r�)r�rdr�r"r�r�s   @r�test_interfacemethod_is_generalz.InterfaceTests.test_interfacemethod_is_general�sA���,�2�		�	�		�	
����4��"�%��������"�-rN)7rrrr�r�r�r�r�r	rr%r6r?rDrMr[rfrvr|r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrr&r4rLrPrRr\rdrkrrrxr�r�r�r�r�r�r�r-rrr�r�}s��4�6�8�>:�,9�84�B)5�V=�"8�*:�.;�F�A�2A�07B�rJ�6�,'8�RD�6�,'8�R/�-�/�2+�D�A�.	?�4�	=�5� &�<-M�^3@�jD�"2�:N�2�.=�*F�,-�*$�#�
+�
,�1�2%�(!4�H�,
L�*C�X.rr�c�.�eZdZdZd�Zd�Zd�Zd�Zd�Zy)�AttributeTests�
TestAttributec��ddlm}|S)Nrr�)r!r�)r$r�s  rrIzAttributeTests._getTargetClass	s��6��rc���|j�}t|�|_t|�}|j	|jd�|�|j	|j
dtzdz�|�y)N�-<zope.interface.interface.Attribute object at� z.AttributeTests.TestAttribute>)rMr�r��reprr��
startswith�endswithr�r$r��rs   r�test__repr__w_interfacez&AttributeTests.test__repr__w_interface	s]���������:�����L��������%T�U�WX�Y�����
�
�3��>�4T�#T�U�WX�Yrc��|j�}t|�}|j|jd�|�|j|j	d�|�y)Nr�z TestAttribute>)rMr�r�r�r�r�s   r�test__repr__wo_interfacez'AttributeTests.test__repr__wo_interface	sG���������L��������%T�U�WX�Y�����
�
�#4�5�q�9rc��|j�}t|�|_t|�}|j	|t
dz�y)Nz.AttributeTests.TestAttribute)rMr�r�r7r"rr�s   r�test__str__w_interfacez%AttributeTests.test__str__w_interface!	s8���������:�����K������H�'F�F�Grc�^�|j�}t|�}|j|d�y)Nr�)rMr7r"r�s   r�test__str__wo_interfacez&AttributeTests.test__str__wo_interface'	s&���������K������O�,rN)	rrrrKrIr�r�r�r�r-rrr�r�	s"��"�L��Z�:�H�-rr�c�^�eZdZdZd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zy)�MethodTests�
TestMethodc��ddlm}|S)Nrr])r!r^)r$r^s  rrIzMethodTests._getTargetClass1	s
��3��
rc���|j�}|j|ji�ddi|_|j|jddi�|`|j|ji�yrb)rMr"r��r$r�s  r�test_optional_as_propertyz%MethodTests.test_optional_as_property5	s]�������������"�-� �%�.���������5�%�.�9��O�������"�-rc�
�ddlm}|j�}	|�|jd�y#|$rL}|j	|j
d�|j	|j|j�Yd}~yd}~wwxYw)Nr)�BrokenImplementationz*__call__ should raise BrokenImplementation)r�r�rMr�r"r�rLrK)r$r�r�r�s    r�)test___call___raises_BrokenImplementationz5MethodTests.test___call___raises_BrokenImplementation=	sm��B������	D��H�

�I�I�B�C��	$�	8����Q�[�[�$�/����Q�V�V�T�%6�%6�7�7��	8�s�1�B�AA=�=Bc�:�|j�}|j�}|jt|d�g�|jt|d�g�|j|di�|j|dd�|j|dd�y)N�
positional�requiredr��varargs�kwargs)rM�getSignatureInfor"rS)r$r��infos   r�test_getSignatureInfo_barez&MethodTests.test_getSignatureInfo_bareH	s���������&�&�(������d�<�0�1�2�6�����d�:�.�/��4�����j�)�2�.�����i��$�/�����h���.rc�d�|j�}|j|j�d�y)Nz())rMr"r�r�s  r�test_getSignatureString_barez(MethodTests.test_getSignatureString_bareQ	s&�����������2�2�4�d�;rc��|j�}dgx|_|_|j|j	�d�y)Nrcz(foo))rMr�r�r"r�r�s  r�'test_getSignatureString_w_only_requiredz3MethodTests.test_getSignatureString_w_only_requiredU	s7�������/4�g�5���F�O�����2�2�4�g�>rc��|j�}dgx|_|_ddi|_|j	|j�d�y)Nrcr5z(foo='bar'))rMr�r�r�r"r�r�s  r�"test_getSignatureString_w_optionalz.MethodTests.test_getSignatureString_w_optionalZ	sB�������/4�g�5���F�O� �%�.�������2�2�4�m�Drc�r�|j�}d|_|j|j�d�y)Nrz(*args))rMr�r"r�r�s  r�!test_getSignatureString_w_varargsz-MethodTests.test_getSignatureString_w_varargs`	s-��������������2�2�4�i�@rc�r�|j�}d|_|j|j�d�y)Nrz(**kw))rMr�r"r�r�s  r� test_getSignatureString_w_kwargsz,MethodTests.test_getSignatureString_w_kwargse	s-���������
�����2�2�4�h�?rc��|j�}d|_t|�|_t	|�}|j|j
d�|�|j|jdtzdz�|�y)Nr�*<zope.interface.interface.Method object atr�z.MethodTests.TestMethod(**kw)>)	rMr�r�r�r�r�r�r�rr�s   rr�z#MethodTests.test__repr__w_interfacej	sd���������
���:�����L��������%Q�R�TU�V�����
�
�3��>�4T�#T�U�WX�Yrc���|j�}d|_t|�}|j|j	d�|�|j|jd�|�y)Nrrz TestMethod(**kw)>)rMr�r�r�r�r�r�s   rr�z$MethodTests.test__repr__wo_interfacer	sN���������
���L��������%Q�R�TU�V�����
�
�#7�8�!�<rc��|j�}d|_t|�|_t	|�}|j|tdz�y)Nrz.MethodTests.TestMethod(**kw))rMr�r�r�r7r"rr�s   rr�z"MethodTests.test__str__w_interfacey	s?���������
���:�����K������H�'F�F�Grc�l�|j�}d|_t|�}|j|d�y)NrzTestMethod(**kw))rMr�r7r"r�s   rr�z#MethodTests.test__str__wo_interface�	s.���������
���K������.�/rN)rrrrKrIr�r�r�r�r�rrrr�r�r�r�r-rrr�r�-	sN���L��.�	D�/�<�?�
E�A�
@�
Z�=�H�0rr�c�H�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zy)�Test_fromFunctionc��ddlm}||i|��S)Nrr�)r!r�)r$rrr�s    r�_callFUTzTest_fromFunction._callFUT�	s��9��T�(�R�(�(rc�L�d�}|j|�}|j|j�d�|j|j�d�|j|jd�|jt|j
��g�|j�}|jt|d�g�|jt|d�g�|j|di�|j|dd�|j|dd�y)	Nc��yr�r-r-rr�_funcz*Test_fromFunction.test_bare.<locals>._func�	r�rrr�r�r�r�r�r��rr"rPrRr�rSrTr��r$rr�r�s    r�	test_barezTest_fromFunction.test_bare�	s���	����u�%��������)�7�3��������+�6�����)�)�4�0�����f�7�7�9�:�B�?��&�&�(������d�<�0�1�2�6�����d�:�.�/��4�����j�)�2�.�����i��$�/�����h���.rc��ddlm}Gd�d|�}d�}|j||��}|j|j|�y)Nrr�c��eZdZy)�0Test_fromFunction.test_w_interface.<locals>.IFooNrr-rrr�r�	r�rr�c��yr�r-r-rrrz1Test_fromFunction.test_w_interface.<locals>._func�	r�rr�)r!r�rr"r�)r$r�r�rr�s     r�test_w_interfacez"Test_fromFunction.test_w_interface�	s>��;�	�>�	�	����u���5������)�)�4�0rc�p�d�}|j|d��}|j|j�d�y)Nc��yr�r-r-rrrz,Test_fromFunction.test_w_name.<locals>._func�	r�r�anotherName)rL)rr"rP)r$rr�s   r�test_w_namezTest_fromFunction.test_w_name�	s0��	����u�=��9��������)�=�9rc�F�d�}|j|�}|j�}|jt|d�dg�|jt|d�dg�|j|di�|j|dd�|j|dd�y)Nc��yr�r-�rcs rrz5Test_fromFunction.test_w_only_required.<locals>._func�	r�rr�rcr�r�r�r��rr�r"rSrs    r�test_w_only_requiredz&Test_fromFunction.test_w_only_required�	s���	����u�%���&�&�(������d�<�0�1�E�7�;�����d�:�.�/�%��9�����j�)�2�.�����i��$�/�����h���.rc�J�d	d�}|j|�}|j�}|jt|d�dg�|jt|d�g�|j|dddi�|j|dd�|j|dd�y)
Nr5c��yr�r-r s rrz0Test_fromFunction.test_w_optional.<locals>._func�	r�rr�rcr�r�r�r��r5r!rs    r�test_w_optionalz!Test_fromFunction.test_w_optional�	s���	����u�%���&�&�(������d�<�0�1�E�7�;�����d�:�.�/��4�����j�)�E�5�>�:�����i��$�/�����h���.rc�H�d	d�}|j|d��}|j�}|jt|d�g�|jt|d�g�|j|di�|j|dd�|j|dd�y)
Nc��yr�r-r�s rrz5Test_fromFunction.test_w_optional_self.<locals>._func�	r�rrm)�imlevelr�r�r�r�r�r%r!rs    r�test_w_optional_selfz&Test_fromFunction.test_w_optional_self�	s���	����u�a��0���&�&�(������d�<�0�1�2�6�����d�:�.�/��4�����j�)�2�.�����i��$�/�����h���.rc�B�d�}|j|�}|j�}|jt|d�g�|jt|d�g�|j|di�|j|dd�|j|dd�y)Nc��yr�r-)rs rrz/Test_fromFunction.test_w_varargs.<locals>._func�	r�rr�r�r�r�rr�r!rs    r�test_w_varargsz Test_fromFunction.test_w_varargs�	s���	����u�%���&�&�(������d�<�0�1�2�6�����d�:�.�/��4�����j�)�2�.�����i��&�1�����h���.rc�B�d�}|j|�}|j�}|jt|d�g�|jt|d�g�|j|di�|j|dd�|j|dd�y)Nc��yr�r-)rs rrz.Test_fromFunction.test_w_kwargs.<locals>._func�	r�rr�r�r�r�r�rr!rs    r�
test_w_kwargszTest_fromFunction.test_w_kwargs�	s���	����u�%���&�&�(������d�<�0�1�2�6�����d�:�.�/��4�����j�)�2�.�����i��$�/�����h���.rc�N�dd�}|j|�}|j�}|jt|d�ddg�|jt|d�dg�|j|dddi�|j|dd	�|j|d
d�y)
Nr6c��yr�r-)rcr5rrs    rrz3Test_fromFunction.test_full_spectrum.<locals>._func�	r�rr�rcr5r�r�r�rr�r�r6r!rs    r�test_full_spectrumz$Test_fromFunction.test_full_spectrum�	s���	����u�%���&�&�(������d�<�0�1�E�5�>�B�����d�:�.�/�%��9�����j�)�E�5�>�:�����i��&�1�����h���.rN)
rrrrrrrr"r&r*r-r0r4r-rrrr�	s4��)�
/�1�:�	/�	/�/�$	/�	/�	/rrc�$�eZdZd�Zd�Zd�Zd�Zy)�Test_fromMethodc��ddlm}||i|��S)Nr)�
fromMethod)r!r8)r$rrr8s    rrzTest_fromMethod._callFUT�	s��7��4�&�2�&�&rc�n�Gd�d�}|j|j�}|j|j�d�|j|j	�d�|j|j
d�|jt
|j��g�|j�}|jt
|d�g�|jt
|d�g�|j|di�|j|dd�|j|d	d�y)
Nc��eZdZd�Zy)�)Test_fromMethod.test_no_args.<locals>.Fooc��yr�r-r�s rr5z-Test_fromMethod.test_no_args.<locals>.Foo.bar�	r�rNr�r-rrrr;�	rJrrr5r�r�r�r�r�r�)	rr5r"rPrRr�rSrTr��r$rr�r�s    r�test_no_argszTest_fromMethod.test_no_args�	s��	�	����s�w�w�'��������)�5�1��������+�6�����)�)�4�0�����f�7�7�9�:�B�?��&�&�(������d�<�0�1�2�6�����d�:�.�/��4�����j�)�2�.�����i��$�/�����h���.rc�n�Gd�d�}|j|j�}|j�}|jt	|d�ddg�|jt	|d�dg�|j|dddi�|j|d	d
�|j|dd�y)
Nc��eZdZdd�Zy)�/Test_fromMethod.test_full_spectrum.<locals>.Fooc��yr�r-)r$rcr5rrs     rr5z3Test_fromMethod.test_full_spectrum.<locals>.Foo.bar
r�rNr3r�r-rrrrA
s��
rrr�rcr5r�r�r6r�rr�r)rr5r�r"rSr=s    rr4z"Test_fromMethod.test_full_spectrum
s���	�	����s�w�w�'���&�&�(������d�<�0�1�E�5�>�B�����d�:�.�/�%��9�����j�)�E�5�>�:�����i��&�1�����h���.rc�L�d�}|j|�}|j|j�d�|j|j�d�|j|jd�|jt|j
��g�|j�}|jt|d�g�|jt|d�g�|j|di�|j|dd�|j|dd�y)	Nc��yr�r-r-rrrcz.Test_fromMethod.test_w_non_method.<locals>.foo
r�rrcr�r�r�r�r�r�r)r$rcr�r�s    r�test_w_non_methodz!Test_fromMethod.test_w_non_method
s���	����s�#��������)�5�1��������+�6�����)�)�4�0�����f�7�7�9�:�B�?��&�&�(������d�<�0�1�2�6�����d�:�.�/��4�����j�)�2�.�����i��$�/�����h���.rN)rrrrr>r4rEr-rrr6r6�	s��'�/� 
/�
/rr6c��eZdZd�Zd�Zy)rnc��g|_yr)r�r�s rr�zDummyDependent.__init__(
s	����
rc�:�|jj|�yr)r�rR)r$�originally_changeds  rr�zDummyDependent.changed+
s���
�
���/�0rN)rrrr�r�r-rrrnrn&
s���1rrnc��ddlm}t|dd�}t|dd�}|�$t|t	|��r||kDs|d��yyy)Nrrbrcr5r)r�rcr#rrr�)r�rcrcr5s    rrr/
sT��1�
�#�u�d�
#�C�
�#�u�d�
#�C�
��:�c�4��9�5�
�S�y��A�B�B��6�rc�V�ddlm}t|dd�rt|dd�s|d��yy)Nrrbrcr5r�)r�rcr#)r�rcs  rr�r�;
s1��1��s�E�4� ���e�T�)B��)�*�*�*C� rc��eZdZd�Zd�Zd�Zy)r�c��||_|D�cic]}|t||���c}|_|j�D]\}}t	|||��ycc}wr)r%r#�
to_restore�items�setattr)r$r%r�keyr0s     rr�z_Monkey.__init__C
sR�����@B�C��3���� 4�4�C����(�(�*�	(�J�C���F�C��'�	(��Ds�Ac��|Srr-r�s r�	__enter__z_Monkey.__enter__I
s���rc�v�|jj�D]\}}t|j||��yr)rNrOrPr%)r$�exc_type�exc_val�exc_tbrQr0s      r�__exit__z_Monkey.__exit__L
s2���/�/�/�/�1�	-�J�C���D�K�K��e�,�	-rN)rrrr�rSrXr-rrr�r�A
s��(��-rr�)rQ�unittest�zope.interface.testsrrrr�r`�TestCaserr/rEr�r�r�r�rr?rDr\r�r�r�r�rr6rnrr�r�r-rr�<module>r\s{����1�6�(�
�(��C�X�&�&�C�B!9�x�(�(�!9�HE(�8�$�$�E(�P9�H�$5�$5�9�<!�:�2�!�+5�<�+5�\f5��f5�R*\�?�*\�Z�0�.�!�*�*��7�2�H�4E�4E�7�>Z
��*�*�Z
�z]1�(�+�+�]1�@L.�X�&�&�L.�^$-�\�-�BW0�.�W0�tk/��)�)�k/�\//�h�'�'�//�b1�1�
C�+�
-�
-r

Zerion Mini Shell 1.0