Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.9/test/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.9/test/__pycache__/test_abc.cpython-39.opt-1.pyc

a

��g�M�@sldZddlZddlZddlZddlmZdd�Zeejej�\Z	Z
Zeejej�\ZZ
Zedkrhe��dS)zUnit tests for abc.py.�N)�
isabstractcsNG�fdd�dtj�}G��fdd�dtj�}G�fdd�dtj�}|||fS)Ncs0eZdZ�fdd�Z�fdd�Z�fdd�ZdS)z#test_factory.<locals>.TestLegacyAPIcs�tjdd��}|�|j�dd�}|�t|d��Gdd�d�d�}|�t|�Gd	d
�d
|�}|�|�j	d�|�t
|j	dd��dS)
NcSsdS�N���selfrr�)/usr/local/lib/python3.9/test/test_abc.py�fooszMtest_factory.<locals>.TestLegacyAPI.test_abstractproperty_basics.<locals>.foocSsdSrrrrrr�bar�zMtest_factory.<locals>.TestLegacyAPI.test_abstractproperty_basics.<locals>.bar�__isabstractmethod__c@seZdZejdd��ZdS)zKtest_factory.<locals>.TestLegacyAPI.test_abstractproperty_basics.<locals>.CcSsdS�N�rrrrrrszOtest_factory.<locals>.TestLegacyAPI.test_abstractproperty_basics.<locals>.C.fooN)�__name__�
__module__�__qualname__�abc�abstractpropertyrrrrr�Csr��	metaclasscs eZdZe�fdd��Z�ZS)zKtest_factory.<locals>.TestLegacyAPI.test_abstractproperty_basics.<locals>.Dcst�jSr��superrr��	__class__rrrszOtest_factory.<locals>.TestLegacyAPI.test_abstractproperty_basics.<locals>.D.foo)rrr�propertyr�
__classcell__rrrr�Dsrr
F)rr�
assertTruer�assertFalse�hasattr�assertRaises�	TypeError�assertEqualr�getattr�rrr	rr��abc_ABCMetarr�test_abstractproperty_basicss
z@test_factory.<locals>.TestLegacyAPI.test_abstractproperty_basicscs�tjdd��}|�|j�tdd��}|�t|dd��Gdd�d�d	�}|�t|�Gd
d�d|�}|�	|�
�d�|�	|��
�d�dS)NcSsdSrr��clsrrrr$szPtest_factory.<locals>.TestLegacyAPI.test_abstractclassmethod_basics.<locals>.foocSsdSrrr(rrrr	'szPtest_factory.<locals>.TestLegacyAPI.test_abstractclassmethod_basics.<locals>.barrFc@seZdZejdd��ZdS)zNtest_factory.<locals>.TestLegacyAPI.test_abstractclassmethod_basics.<locals>.CcSs|jSr�rr(rrrr,szRtest_factory.<locals>.TestLegacyAPI.test_abstractclassmethod_basics.<locals>.C.fooN)rrrr�abstractclassmethodrrrrrr+srrcs eZdZe�fdd��Z�ZS)zNtest_factory.<locals>.TestLegacyAPI.test_abstractclassmethod_basics.<locals>.Dcs
t���Srrr(rrrr0szRtest_factory.<locals>.TestLegacyAPI.test_abstractclassmethod_basics.<locals>.D.foo�rrr�classmethodrrrrrrr/sr)rr+rrr-rr#r r!r"rr$r%rr�test_abstractclassmethod_basics#s

zCtest_factory.<locals>.TestLegacyAPI.test_abstractclassmethod_basicscs�tjdd��}|�|j�tdd��}|�t|dd��Gdd�d�d	�}|�t|�Gd
d�d|�}|�	|�
�d�|�	|��
�d�dS)
NcSsdSrrrrrrr6szQtest_factory.<locals>.TestLegacyAPI.test_abstractstaticmethod_basics.<locals>.foocSsdSrrrrrrr	9szQtest_factory.<locals>.TestLegacyAPI.test_abstractstaticmethod_basics.<locals>.barrFc@seZdZejdd��ZdS)zOtest_factory.<locals>.TestLegacyAPI.test_abstractstaticmethod_basics.<locals>.CcSsdSrrrrrrr>szStest_factory.<locals>.TestLegacyAPI.test_abstractstaticmethod_basics.<locals>.C.fooN)rrrr�abstractstaticmethodrrrrrr=srrc@seZdZedd��ZdS)zOtest_factory.<locals>.TestLegacyAPI.test_abstractstaticmethod_basics.<locals>.DcSsdS�N�rrrrrrBszStest_factory.<locals>.TestLegacyAPI.test_abstractstaticmethod_basics.<locals>.D.fooN�rrr�staticmethodrrrrrrAsrr1)rr/rrr3rr#r r!r"rr$r%rr� test_abstractstaticmethod_basics5s

zDtest_factory.<locals>.TestLegacyAPI.test_abstractstaticmethod_basicsN)rrrr'r.r4rr%rr�
TestLegacyAPIsr5cseZdZdd�Zdd�Z�fdd�Z�fdd�Z�fd	d
�Z�fdd�Z�fd
d�Z	�fdd�Z
�fdd�Z�fdd�Z�fdd�Z
�fdd�Z�fdd�Z��fdd�Z�fdd�Z�fdd �Z�fd!d"�Z�fd#d$�Z�fd%d&�Zd'd(�Z�fd)d*�Zd+d,�Z�fd-d.�Zd/S)0ztest_factory.<locals>.TestABCcSsTGdd�dtj�}|�t|�tj�|�t|�Gdd�d|�}|�|��d�dS)Nc@seZdZeejdd���ZdS)z8test_factory.<locals>.TestABC.test_ABC_helper.<locals>.CcSs|jSrr*r(rrrrMsz<test_factory.<locals>.TestABC.test_ABC_helper.<locals>.C.fooN�rrrr-r�abstractmethodrrrrrrLsrcs eZdZe�fdd��Z�ZS)z8test_factory.<locals>.TestABC.test_ABC_helper.<locals>.Dcs
t���Srrr(rrrrSsz<test_factory.<locals>.TestABC.test_ABC_helper.<locals>.D.foor,rrrrrRsr)r�ABCr"�type�ABCMetar r!r)rrrrrr�test_ABC_helperJs
z-test_factory.<locals>.TestABC.test_ABC_helpercSs6tjdd��}|�|j�dd�}|�t|d��dS)NcSsdSrrrrrrrXszEtest_factory.<locals>.TestABC.test_abstractmethod_basics.<locals>.foocSsdSrrrrrrr	[r
zEtest_factory.<locals>.TestABC.test_abstractmethod_basics.<locals>.barr)rr7rrrr)rrr	rrr�test_abstractmethod_basicsWs

z8test_factory.<locals>.TestABC.test_abstractmethod_basicscs~ttjdd���}|�|j�dd�}|�t|dd��Gdd�d�d	��|�t��G�fd
d�d��}|�	|�j
d�dS)
NcSsdSrrrrrrr_szGtest_factory.<locals>.TestABC.test_abstractproperty_basics.<locals>.foocSsdSrrrrrrr	cr
zGtest_factory.<locals>.TestABC.test_abstractproperty_basics.<locals>.barrFc@seZdZeejdd���ZdS)zEtest_factory.<locals>.TestABC.test_abstractproperty_basics.<locals>.CcSsdSrrrrrrrgszItest_factory.<locals>.TestABC.test_abstractproperty_basics.<locals>.C.fooN)rrrrrr7rrrrrrfsrrcs$eZdZ�jj�fdd��Z�ZS)zEtest_factory.<locals>.TestABC.test_abstractproperty_basics.<locals>.Dcst�jSrrrrrrrlszItest_factory.<locals>.TestABC.test_abstractproperty_basics.<locals>.D.foo�rrrr�getterrr�rrrrksrr
)rrr7rrrr#r r!r"r)rrr	rr%r?rr'^sz:test_factory.<locals>.TestABC.test_abstractproperty_basicscs�ttjdd���}|�|j�tdd��}|�t|dd��Gdd�d�d	�}|�t|�Gd
d�d|�}|�	|�
�d�|�	|��
�d�dS)NcSsdSrrr(rrrrqszJtest_factory.<locals>.TestABC.test_abstractclassmethod_basics.<locals>.foocSsdSrrr(rrrr	uszJtest_factory.<locals>.TestABC.test_abstractclassmethod_basics.<locals>.barrFc@seZdZeejdd���ZdS)zHtest_factory.<locals>.TestABC.test_abstractclassmethod_basics.<locals>.CcSs|jSrr*r(rrrrzszLtest_factory.<locals>.TestABC.test_abstractclassmethod_basics.<locals>.C.fooNr6rrrrrysrrcs eZdZe�fdd��Z�ZS)zHtest_factory.<locals>.TestABC.test_abstractclassmethod_basics.<locals>.Dcs
t���Srrr(rrrrszLtest_factory.<locals>.TestABC.test_abstractclassmethod_basics.<locals>.D.foor,rrrrr~sr)r-rr7rrrr#r r!r"rr$r%rrr.ps
z=test_factory.<locals>.TestABC.test_abstractclassmethod_basicscs�ttjdd���}|�|j�tdd��}|�t|dd��Gdd�d�d	�}|�t|�Gd
d�d|�}|�	|�
�d�|�	|��
�d�dS)
NcSsdSrrrrrrr�szKtest_factory.<locals>.TestABC.test_abstractstaticmethod_basics.<locals>.foocSsdSrrrrrrr	�szKtest_factory.<locals>.TestABC.test_abstractstaticmethod_basics.<locals>.barrFc@seZdZeejdd���ZdS)zItest_factory.<locals>.TestABC.test_abstractstaticmethod_basics.<locals>.CcSsdSrrrrrrr�szMtest_factory.<locals>.TestABC.test_abstractstaticmethod_basics.<locals>.C.fooN)rrrr3rr7rrrrrr�srrc@seZdZedd��ZdS)zItest_factory.<locals>.TestABC.test_abstractstaticmethod_basics.<locals>.DcSsdSr0rrrrrr�szMtest_factory.<locals>.TestABC.test_abstractstaticmethod_basics.<locals>.D.fooNr2rrrrr�srr1)r3rr7rrrr#r r!r"rr$r%rrr4�s
z>test_factory.<locals>.TestABC.test_abstractstaticmethod_basicscs(Gdd�d�d�}d}|�t||�dS)Nc@seZdZejdd��ZdS)zPtest_factory.<locals>.TestABC.test_object_new_with_one_abstractmethod.<locals>.CcSsdSrrrrrr�
method_one�sz[test_factory.<locals>.TestABC.test_object_new_with_one_abstractmethod.<locals>.C.method_oneN)rrrrr7r@rrrrr�srrz'class C with abstract method method_one��assertRaisesRegexr!�rr�msgr%rr�'test_object_new_with_one_abstractmethod�szEtest_factory.<locals>.TestABC.test_object_new_with_one_abstractmethodcs(Gdd�d�d�}d}|�t||�dS)Nc@s(eZdZejdd��Zejdd��ZdS)zRtest_factory.<locals>.TestABC.test_object_new_with_many_abstractmethods.<locals>.CcSsdSrrrrrrr@�sz]test_factory.<locals>.TestABC.test_object_new_with_many_abstractmethods.<locals>.C.method_onecSsdSrrrrrr�
method_two�sz]test_factory.<locals>.TestABC.test_object_new_with_many_abstractmethods.<locals>.C.method_twoN)rrrrr7r@rFrrrrr�s
rrz4class C with abstract methods method_one, method_tworArCr%rr�)test_object_new_with_many_abstractmethods�szGtest_factory.<locals>.TestABC.test_object_new_with_many_abstractmethodscs
tjtjtjtjfD]�G�fdd�d�d�}|�|jdh�|�t|�|�	t
|��Gdd�d|�}|�|jdh�|�t|�|�	t
|��Gdd�d|�}|�|jt��|�|�t
|��G�fd	d
�d
|�}|�|jdh�|�t|�|�	t
|��qdS)Ncs eZdZ�dd��Zdd�ZdS)zHtest_factory.<locals>.TestABC.test_abstractmethod_integration.<locals>.CcSsdSrrrrrrr�szLtest_factory.<locals>.TestABC.test_abstractmethod_integration.<locals>.C.foocSsdSrrrrrrr	�r
zLtest_factory.<locals>.TestABC.test_abstractmethod_integration.<locals>.C.barN)rrrrr	r�Z
abstractthingrrr�s
rrrc@seZdZdd�ZdS)zHtest_factory.<locals>.TestABC.test_abstractmethod_integration.<locals>.DcSsdSrrrrrrr	�r
zLtest_factory.<locals>.TestABC.test_abstractmethod_integration.<locals>.D.barN�rrrr	rrrrr�src@seZdZdd�ZdS)zHtest_factory.<locals>.TestABC.test_abstractmethod_integration.<locals>.EcSsdSrrrrrrr�r
zLtest_factory.<locals>.TestABC.test_abstractmethod_integration.<locals>.E.fooN�rrrrrrrr�E�srKcseZdZ�dd��ZdS)zHtest_factory.<locals>.TestABC.test_abstractmethod_integration.<locals>.FcSsdSrrrrrrr	�szLtest_factory.<locals>.TestABC.test_abstractmethod_integration.<locals>.F.barNrIrrHrr�F�srLr	)
rr7rr+r/r"�__abstractmethods__r r!rr�setr)rrrrKrLr%rHr�test_abstractmethod_integration�s(�z=test_factory.<locals>.TestABC.test_abstractmethod_integrationcs�Gdd�d�d��|�t��G�fdd�d���|�t��G�fdd�d��}|�|�jd�Gd	d
�d
t��|�t��$G�fdd�d��}Wd�n1s�0YdS)
Nc@s2eZdZeejdd���Zejejdd���ZdS)zMtest_factory.<locals>.TestABC.test_descriptors_with_abstractmethod.<locals>.CcSsdSrrrrrrr�szQtest_factory.<locals>.TestABC.test_descriptors_with_abstractmethod.<locals>.C.foocSsdSrr�r�valrrrr�sN)rrrrrr7r�setterrrrrr�srrcs$eZdZ�jj�fdd��Z�ZS)zMtest_factory.<locals>.TestABC.test_descriptors_with_abstractmethod.<locals>.Dcst�jSrrrrrrr�szQtest_factory.<locals>.TestABC.test_descriptors_with_abstractmethod.<locals>.D.foor=rr?rrr�srcseZdZ�jjdd��ZdS)zMtest_factory.<locals>.TestABC.test_descriptors_with_abstractmethod.<locals>.EcSsdSrrrPrrrr�szQtest_factory.<locals>.TestABC.test_descriptors_with_abstractmethod.<locals>.E.fooN�rrrrrRr�rrrrK�srKr
c@seZdZdd�ZeZdS)zStest_factory.<locals>.TestABC.test_descriptors_with_abstractmethod.<locals>.NotBoolcSs
t��dSr)�
ValueErrorrrrr�__bool__�sz\test_factory.<locals>.TestABC.test_descriptors_with_abstractmethod.<locals>.NotBool.__bool__N)rrrrV�__len__rrrr�NotBool�srXcs$eZdZdd�Z��e_ee�ZdS)zMtest_factory.<locals>.TestABC.test_descriptors_with_abstractmethod.<locals>.FcSsdSrrrrrrr	�szQtest_factory.<locals>.TestABC.test_descriptors_with_abstractmethod.<locals>.F.barN)rrrr	rrrr)rXrrrL�srL)r r!r"r�objectrU)rrKrLr%)rrrXr�$test_descriptors_with_abstractmethod�szBtest_factory.<locals>.TestABC.test_descriptors_with_abstractmethodcszG�fdd�d��G�fdd�d�d��|�t��G�fdd�d���|�t��G�fdd	�d	��}|�|jj�dS)
Ncs:eZdZd
dd�Z�fdd�Z�fdd�Zedd	��ZdS)z\test_factory.<locals>.TestABC.test_customdescriptors_with_abstractmethod.<locals>.DescriptorNcSs||_||_dSr)�_fget�_fset)r�fget�fsetrrr�__init__�szetest_factory.<locals>.TestABC.test_customdescriptors_with_abstractmethod.<locals>.Descriptor.__init__cs�||j�Sr�r[�r�callable��
Descriptorrrr>�szctest_factory.<locals>.TestABC.test_customdescriptors_with_abstractmethod.<locals>.Descriptor.gettercs�|j|�Srr`rarcrrrR�szctest_factory.<locals>.TestABC.test_customdescriptors_with_abstractmethod.<locals>.Descriptor.settercSst|jdd�pt|jdd�S)NrF)r#r[r\rrrrr�s�zqtest_factory.<locals>.TestABC.test_customdescriptors_with_abstractmethod.<locals>.Descriptor.__isabstractmethod__)N)rrrr_r>rRrrrrcrrrd�s

rdcs2eZdZ�ejdd���Zejejdd���ZdS)zStest_factory.<locals>.TestABC.test_customdescriptors_with_abstractmethod.<locals>.CcSsdSrrrrrrr�szWtest_factory.<locals>.TestABC.test_customdescriptors_with_abstractmethod.<locals>.C.foocSsdSrrrPrrrr�sN)rrrrr7rrRrrcrrr�srrcs$eZdZ�jj�fdd��Z�ZS)zStest_factory.<locals>.TestABC.test_customdescriptors_with_abstractmethod.<locals>.Dcst�jSrrrrrrr�szWtest_factory.<locals>.TestABC.test_customdescriptors_with_abstractmethod.<locals>.D.foor=rr?rrr�srcseZdZ�jjdd��ZdS)zStest_factory.<locals>.TestABC.test_customdescriptors_with_abstractmethod.<locals>.EcSsdSrrrPrrrrszWtest_factory.<locals>.TestABC.test_customdescriptors_with_abstractmethod.<locals>.E.fooNrSrrTrrrK�srK)r r!rrr)rrKr%)rrrdr�*test_customdescriptors_with_abstractmethod�szHtest_factory.<locals>.TestABC.test_customdescriptors_with_abstractmethodcsJGdd�d�d�}|�|jdh�Gdd�dt|�}Gdd�d|d�}dS)	Nc@seZdZejdd��ZdS)z;test_factory.<locals>.TestABC.test_metaclass_abc.<locals>.AcSsdSrrrrrr�xsz=test_factory.<locals>.TestABC.test_metaclass_abc.<locals>.A.xN)rrrrr7rfrrrr�Asrgrrfc@seZdZdd�ZdS)z>test_factory.<locals>.TestABC.test_metaclass_abc.<locals>.metacSsdS�N�rrrrrrfsz@test_factory.<locals>.TestABC.test_metaclass_abc.<locals>.meta.xN)rrrrfrrrr�metasrjc@seZdZdS)z;test_factory.<locals>.TestABC.test_metaclass_abc.<locals>.CN�rrrrrrrrsr)r"rMr9)rrgrjrr%rr�test_metaclass_abcsz0test_factory.<locals>.TestABC.test_metaclass_abccsGdd�d�d�}Gdd�dt�}|�}|�t||��|�t||f��|�||�|�||f�|�|�}|�t||��|�t||f��|�||�|�||f�|�||�Gdd�d|�}|�}|�t||��|�t||f��|�||�|�||f�dS)Nc@seZdZdS)zAtest_factory.<locals>.TestABC.test_registration_basics.<locals>.ANrkrrrrrgsrgrc@seZdZdS)zAtest_factory.<locals>.TestABC.test_registration_basics.<locals>.BNrkrrrr�Bsrmc@seZdZdS)zAtest_factory.<locals>.TestABC.test_registration_basics.<locals>.CNrkrrrrr!sr)rYr�
issubclassZassertNotIsInstance�registerr�assertIsInstance�assertIs)rrgrm�b�B1r�cr%rr�test_registration_basicss&
z6test_factory.<locals>.TestABC.test_registration_basicscs�Gdd�d�d�}|jGdd�dt��}|�}|�t||��|�t||f��|�||�|�||f�|jGdd�d|��}|�}|�t||��|�t||f��|�||�|�||f�|�||�|��dS)Nc@seZdZdS)zDtest_factory.<locals>.TestABC.test_register_as_class_deco.<locals>.ANrkrrrrrg*srgrc@seZdZdS)zDtest_factory.<locals>.TestABC.test_register_as_class_deco.<locals>.BNrkrrrrrm,srmc@seZdZdS)zDtest_factory.<locals>.TestABC.test_register_as_class_deco.<locals>.CNrkrrrrr4sr)rorYrrnrprq)rrgrmrrrrtr%rr�test_register_as_class_deco)s z9test_factory.<locals>.TestABC.test_register_as_class_decocs�Gdd�d�d�}Gdd�d�}|�}|�t||��|�t||f����}|�|���}|�||�|�t||��|�t||f��dS)Nc@seZdZdS)zEtest_factory.<locals>.TestABC.test_isinstance_invalidation.<locals>.ANrkrrrrrg?srgrc@seZdZdS)zEtest_factory.<locals>.TestABC.test_isinstance_invalidation.<locals>.BNrkrrrrrmAsrm)r�
isinstanceroZ
assertGreaterr)rrgrmrrZ	token_oldZ	token_new�r&�abc_get_cache_tokenrr�test_isinstance_invalidation>s
z:test_factory.<locals>.TestABC.test_isinstance_invalidationcs�Gdd�d�d�}|�t�|�d|�|�d|f�|�tt|��|�tt|f��Gdd�d|�}|�t�Gdd�dt�}|�d	|�|�d	|f�|�tt|��|�tt|f��|�t||��|�t||f��dS)
Nc@seZdZdS)zCtest_factory.<locals>.TestABC.test_registration_builtins.<locals>.ANrkrrrrrgNsrgr�*c@seZdZdS)zCtest_factory.<locals>.TestABC.test_registration_builtins.<locals>.BNrkrrrrrmUsrmc@seZdZdS)zCtest_factory.<locals>.TestABC.test_registration_builtins.<locals>.CNrkrrrrrXr
r�)ro�intrprrn�str)rrgrmrr%rr�test_registration_builtinsMs

z8test_factory.<locals>.TestABC.test_registration_builtinscs�Gdd�d�d�}|�|�Gdd�d|�}|�t|j|�Gdd�dt�}|�|�|�|�Gdd	�d	|�}|�|�|�t|j|�|�|�dS)
Nc@seZdZdS)zEtest_factory.<locals>.TestABC.test_registration_edge_cases.<locals>.ANrkrrrrrgasrgrc@seZdZdS)zFtest_factory.<locals>.TestABC.test_registration_edge_cases.<locals>.A1Nrkrrrr�A1dsr�c@seZdZdS)zEtest_factory.<locals>.TestABC.test_registration_edge_cases.<locals>.BNrkrrrrrmgsrmc@seZdZdS)zEtest_factory.<locals>.TestABC.test_registration_edge_cases.<locals>.CNrkrrrrrksr)ror �RuntimeErrorrY)rrgr�rmrr%rr�test_registration_edge_cases`s



z:test_factory.<locals>.TestABC.test_registration_edge_casescs(Gdd�d�d�}|�td|jd�dS)Nc@seZdZdS)z@test_factory.<locals>.TestABC.test_register_non_class.<locals>.ANrkrrrrrgrsrgrzCan only register classesr1)rBr!ro)rrgr%rr�test_register_non_classqs�z5test_factory.<locals>.TestABC.test_register_non_classcs�Gdd�d�d�}|�t||��|�t||f��Gdd�d�d�}|�t||��|�t||f��|�t||��|�t||f��Gdd�d�d�}|�|�Gdd	�d	|�}|�t||��|�t||f��Gd
d�d|�}|�|�|�t||��|�t||f��|�t||��|�t||f��|�t||��|�t||f��|�t||��|�t||f��|�t||��|�t||f��|�t�Gdd
�d
t�}|�t||��|�t||f��|�d|�|�d|f�dS)Nc@seZdZdS)zItest_factory.<locals>.TestABC.test_registration_transitiveness.<locals>.ANrkrrrrrgxsrgrc@seZdZdS)zItest_factory.<locals>.TestABC.test_registration_transitiveness.<locals>.BNrkrrrrrm|srmc@seZdZdS)zItest_factory.<locals>.TestABC.test_registration_transitiveness.<locals>.CNrkrrrrr�src@seZdZdS)zJtest_factory.<locals>.TestABC.test_registration_transitiveness.<locals>.B1Nrkrrrrrs�srsc@seZdZdS)zJtest_factory.<locals>.TestABC.test_registration_transitiveness.<locals>.C1Nrkrrrr�C1�sr�c@seZdZdS)zMtest_factory.<locals>.TestABC.test_registration_transitiveness.<locals>.MyIntNrkrrrr�MyInt�sr�r{)rrnrror}rp)rrgrmrrsr�r�r%rr� test_registration_transitivenessws>


z>test_factory.<locals>.TestABC.test_registration_transitivenessc
s�Gdd�d�d�}|�t��ti|�Wd�n1s<0Y|�t��td|�Wd�n1sp0YGdd�d�}|�t��t|�|�Wd�n1s�0Yddd�d	d�d
d�g}t|�D]�\}�G�fdd�d�d�}|j|d
��F|�t��tt|�Wd�n1�s60YWd�q�1�sV0Yq�d��fdd��G�fdd�d�d�}|�t���tt|�Wd�n1�s�0YdS)Nc@seZdZdS)zFtest_factory.<locals>.TestABC.test_issubclass_bad_arguments.<locals>.ANrkrrrrrg�srgrr{c@seZdZdZdS)zFtest_factory.<locals>.TestABC.test_issubclass_bad_arguments.<locals>.Cr{N)rrr�__mro__rrrrr�srcSsgSrr)rfrrr�<lambda>�r
zMtest_factory.<locals>.TestABC.test_issubclass_bad_arguments.<locals>.<lambda>cSsdS�Nr{rrrrrr��r
cSsdgSr�rrrrrr��r
cseZdZ�ZdS�zFtest_factory.<locals>.TestABC.test_issubclass_bad_arguments.<locals>.SN�rrr�__subclasses__r)�funcrr�S�sr�)�izexception from __subclasses__cst���dSr)�	Exceptionr)�exc_msgrr�	raise_exc�szNtest_factory.<locals>.TestABC.test_issubclass_bad_arguments.<locals>.raise_exccseZdZ�ZdSr�r�r)r�rrr��s)r r!rn�	enumerateZsubTestr}rBr�)rrgrZbogus_subclassesr�r�r%)r�r�r�r�test_issubclass_bad_arguments�s.((*�Lz;test_factory.<locals>.TestABC.test_issubclass_bad_argumentscs�G�fdd�dtjd��|�t����|�t��f��Gdd�d�}|�t|���|�t|�f��Gdd�d�}|�t|���|�t|�f��dS)NcseZdZe�fdd��ZdS)z:test_factory.<locals>.TestABC.test_subclasshook.<locals>.Acs|�urd|jvStS)Nr)�__dict__�NotImplemented)r)r�rgrr�__subclasshook__�s
zKtest_factory.<locals>.TestABC.test_subclasshook.<locals>.A.__subclasshook__N)rrrr-r�rr�rrrg�srgrc@seZdZdZdS)z:test_factory.<locals>.TestABC.test_subclasshook.<locals>.Br{NrJrrrrrm�srmc@seZdZdZdS)z:test_factory.<locals>.TestABC.test_subclasshook.<locals>.Cr{N)rrrZspamrrrrr�sr)rr:rrnr)rrmrrr�r�test_subclasshook�sz/test_factory.<locals>.TestABC.test_subclasshookcs^Gdd�d�d�}G�fdd�dt��Gdd�d|��}|��jd�|�|��jd	�dS)
Nc@seZdZdS)zHtest_factory.<locals>.TestABC.test_all_new_methods_are_called.<locals>.ANrkrrrrrg�srgrcs"eZdZdZ��fdd�Z�ZS)zHtest_factory.<locals>.TestABC.test_all_new_methods_are_called.<locals>.Brcs�jd7_t��|�Srh)�counterr�__new__r()rmrrrr��szPtest_factory.<locals>.TestABC.test_all_new_methods_are_called.<locals>.B.__new__)rrrr�r�rr�rmrrrm�srmc@seZdZdS)zHtest_factory.<locals>.TestABC.test_all_new_methods_are_called.<locals>.CNrkrrrrr�srrri)rYr"r�)rrgrr%r�r�test_all_new_methods_are_called�sz=test_factory.<locals>.TestABC.test_all_new_methods_are_calledcSs|�ttjd��dS)N�	__slots__)rrrr8rrrr�test_ABC_has___slots__�sz4test_factory.<locals>.TestABC.test_ABC_has___slots__csNdd�}Gdd�d�}Gdd�d�}Gdd�d|�||��}|�|j��dS)	Ncs&G��fdd�dt�}t�|ddi�S)NcseZdZ��fdd�ZdS)z^test_factory.<locals>.TestABC.test_tricky_new_works.<locals>.with_metaclass.<locals>.metaclasscs�|�|�Srr)r)�nameZ
this_bases�d��basesrjrrr��szftest_factory.<locals>.TestABC.test_tricky_new_works.<locals>.with_metaclass.<locals>.metaclass.__new__N)rrrr�rr�rrr�srZtemporary_classr)r9r�)rjr�rrr�r�with_metaclass�szKtest_factory.<locals>.TestABC.test_tricky_new_works.<locals>.with_metaclassc@seZdZdS)z>test_factory.<locals>.TestABC.test_tricky_new_works.<locals>.ANrkrrrrrg�r
rgc@seZdZdS)z>test_factory.<locals>.TestABC.test_tricky_new_works.<locals>.BNrkrrrrrm�r
rmc@seZdZdS)z>test_factory.<locals>.TestABC.test_tricky_new_works.<locals>.CNrkrrrrr�sr)r"r)rr�rgrmrr%rr�test_tricky_new_works�s
z3test_factory.<locals>.TestABC.test_tricky_new_worksN)rrrr;r<r'r.r4rErGrOrZrerlrurvrzrr�r�r�r�r�r�r�r�rrxrr�TestABCHs.

'0r�cseZdZ�fdd�ZdS)z-test_factory.<locals>.TestABCWithInitSubclassc	s\Gdd�d�d�}i�G�fdd�d�}Gdd�d||dd	d
d�}|��tdd	d
d��dS)Nc@seZdZdZdS)z\test_factory.<locals>.TestABCWithInitSubclass.test_works_with_init_subclass.<locals>.abc_ABCrN)rrrr�rrrr�abc_ABCsr�rcseZdZ��fdd�Z�ZS)zhtest_factory.<locals>.TestABCWithInitSubclass.test_works_with_init_subclass.<locals>.ReceivesClassKwargscst�����|�dSr)r�__init_subclass__�update)r)�kwargs)r�saved_kwargsrrr�s
zztest_factory.<locals>.TestABCWithInitSubclass.test_works_with_init_subclass.<locals>.ReceivesClassKwargs.__init_subclass__)rrrr�rr�r�rr�ReceivesClassKwargssr�c@seZdZdS)z]test_factory.<locals>.TestABCWithInitSubclass.test_works_with_init_subclass.<locals>.ReceiverNrkrrrr�Receiversr�ri�r
)rf�y�z)r"�dict)rr�r�r�r%r�r�test_works_with_init_subclass�s
zKtest_factory.<locals>.TestABCWithInitSubclass.test_works_with_init_subclassN)rrrr�rr%rr�TestABCWithInitSubclass�sr�)�unittestZTestCase)r&ryr5r�r�rrxr�test_factorys89r��__main__)�__doc__r�rZ_py_abc�inspectrr�r:�get_cache_tokenZTestLegacyAPI_PyZ
TestABC_PyZTestABCWithInitSubclass_PyZTestLegacyAPI_CZ	TestABC_CZTestABCWithInitSubclass_Cr�mainrrrr�<module>s"�
�


Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists