Server : LiteSpeed
System : Linux server51.dnsbootclub.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
User : nandedex ( 1060)
PHP Version : 8.1.33
Disable Function : NONE
Directory :  /opt/cppython/lib/python3.8/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]


Current File : //opt/cppython/lib/python3.8/test/__pycache__/test_abc.cpython-38.pyc
U

>��gH�@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�,/opt/cppython/lib/python3.8/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r5cs�eZdZdd�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$�Zd%d&�Z�fd'd(�Zd)S)*ztest_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
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�srBcseZdZ�dd��ZdS)zHtest_factory.<locals>.TestABC.test_abstractmethod_integration.<locals>.FcSsdSrrrrrrr	�szLtest_factory.<locals>.TestABC.test_abstractmethod_integration.<locals>.F.barNrArr@rr�F�srCr	)
rr7rr+r/r"�__abstractmethods__r r!rr�setr)rrrrBrCr%r@r�test_abstractmethod_integration�s(�z=test_factory.<locals>.TestABC.test_abstractmethod_integrationc	s�Gdd�d�d��|�t��G�fdd�d���|�t��G�fdd�d��}|�|�jd�Gd	d
�d
t��|�t��G�fdd�d��}W5QRXdS)
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>.EcSsdSrrrGrrrr�szQtest_factory.<locals>.TestABC.test_descriptors_with_abstractmethod.<locals>.E.fooN�rrrrrIr�rrrrB�srBr
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)rrrrM�__len__rrrr�NotBool�srOcs$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)rOrrrC�srC)r r!r"r�objectrL)rrBrCr%)rrrOr�$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�rR�r�callable��
Descriptorrrr>�szctest_factory.<locals>.TestABC.test_customdescriptors_with_abstractmethod.<locals>.Descriptor.gettercs�|j|�SrrWrXrZrrrI�szctest_factory.<locals>.TestABC.test_customdescriptors_with_abstractmethod.<locals>.Descriptor.settercSst|jdd�pt|jdd�S)NrF)r#rRrSrrrrr�s�zqtest_factory.<locals>.TestABC.test_customdescriptors_with_abstractmethod.<locals>.Descriptor.__isabstractmethod__)N)rrrrVr>rIrrrrZrrr[�s

r[cs2eZdZ�ejdd���Zejejdd���ZdS)zStest_factory.<locals>.TestABC.test_customdescriptors_with_abstractmethod.<locals>.CcSsdSrrrrrrr�szWtest_factory.<locals>.TestABC.test_customdescriptors_with_abstractmethod.<locals>.C.foocSsdSrrrGrrrr�sN)rrrrr7rrIrrZrrr�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>.EcSsdSrrrGrrrr�szWtest_factory.<locals>.TestABC.test_customdescriptors_with_abstractmethod.<locals>.E.fooNrJrrKrrrB�srB)r r!rrr)rrBr%)rrr[r�*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�x�sz=test_factory.<locals>.TestABC.test_metaclass_abc.<locals>.A.xN)rrrrr7r]rrrr�A�sr^rr]c@seZdZdd�ZdS)z>test_factory.<locals>.TestABC.test_metaclass_abc.<locals>.metacSsdS�N�rrrrrr]�sz@test_factory.<locals>.TestABC.test_metaclass_abc.<locals>.meta.xN)rrrr]rrrr�meta�srac@seZdZdS)z;test_factory.<locals>.TestABC.test_metaclass_abc.<locals>.CN�rrrrrrrr�sr)r"rDr9)rr^rarr%rr�test_metaclass_abc�sz0test_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>.ANrbrrrrr^�sr^rc@seZdZdS)zAtest_factory.<locals>.TestABC.test_registration_basics.<locals>.BNrbrrrr�Bsrdc@seZdZdS)zAtest_factory.<locals>.TestABC.test_registration_basics.<locals>.CNrbrrrrrsr)rPr�
issubclassZassertNotIsInstance�registerr�assertIsInstance�assertIs)rr^rd�b�B1r�cr%rr�test_registration_basics�s&
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>.ANrbrrrrr^sr^rc@seZdZdS)zDtest_factory.<locals>.TestABC.test_register_as_class_deco.<locals>.BNrbrrrrrdsrdc@seZdZdS)zDtest_factory.<locals>.TestABC.test_register_as_class_deco.<locals>.CNrbrrrrr!sr)rfrPrrergrh)rr^rdrirrkr%rr�test_register_as_class_decos 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>.ANrbrrrrr^,sr^rc@seZdZdS)zEtest_factory.<locals>.TestABC.test_isinstance_invalidation.<locals>.BNrbrrrrrd.srd)r�
isinstancerfZassertNotEqualr)rr^rdriZ	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>.ANrbrrrrr^;sr^r�*c@seZdZdS)zCtest_factory.<locals>.TestABC.test_registration_builtins.<locals>.BNrbrrrrrdBsrdc@seZdZdS)zCtest_factory.<locals>.TestABC.test_registration_builtins.<locals>.CNrbrrrrrEsr�)rf�intrgrre�str)rr^rdrr%rr�test_registration_builtins:s

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>.ANrbrrrrr^Nsr^rc@seZdZdS)zFtest_factory.<locals>.TestABC.test_registration_edge_cases.<locals>.A1Nrbrrrr�A1Qsrwc@seZdZdS)zEtest_factory.<locals>.TestABC.test_registration_edge_cases.<locals>.BNrbrrrrrdTsrdc@seZdZdS)zEtest_factory.<locals>.TestABC.test_registration_edge_cases.<locals>.CNrbrrrrrXsr)rfr �RuntimeErrorrP)rr^rwrdrr%rr�test_registration_edge_casesMs



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>.ANrbrrrrr^_sr^rzCan only register classesr1)�assertRaisesRegexr!rf)rr^r%rr�test_register_non_class^s
�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>.ANrbrrrrr^esr^rc@seZdZdS)zItest_factory.<locals>.TestABC.test_registration_transitiveness.<locals>.BNrbrrrrrdisrdc@seZdZdS)zItest_factory.<locals>.TestABC.test_registration_transitiveness.<locals>.CNrbrrrrrosrc@seZdZdS)zJtest_factory.<locals>.TestABC.test_registration_transitiveness.<locals>.B1Nrbrrrrrjrsrjc@seZdZdS)zJtest_factory.<locals>.TestABC.test_registration_transitiveness.<locals>.C1Nrbrrrr�C1vsr|c@seZdZdS)zMtest_factory.<locals>.TestABC.test_registration_transitiveness.<locals>.MyIntNrbrrrr�MyInt�sr}rr)rrerrfrtrg)rr^rdrrjr|r}r%rr� test_registration_transitivenessds>


z>test_factory.<locals>.TestABC.test_registration_transitivenesscsFGdd�d�d�}|�t��ti|�W5QRX|�t��td|�W5QRXGdd�d�}|�t��t|�|�W5QRXddd�d	d�d
d�g}t|�D]V\}�G�fdd�d�d�}|j|d
��&|�t��tt|�W5QRXW5QRXq�d��fdd��G�fdd�d�d�}|�t���tt|�W5QRXdS)Nc@seZdZdS)zFtest_factory.<locals>.TestABC.test_issubclass_bad_arguments.<locals>.ANrbrrrrr^�sr^rrrc@seZdZdZdS)zFtest_factory.<locals>.TestABC.test_issubclass_bad_arguments.<locals>.CrrN)rrr�__mro__rrrrr�srcSsgSrr)r]rrr�<lambda>�r
zMtest_factory.<locals>.TestABC.test_issubclass_bad_arguments.<locals>.<lambda>cSsdS�Nrrrrrrrr��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!re�	enumerateZsubTestrtrzr�)rr^rZbogus_subclassesr�r�r%)r�r�r�r�test_issubclass_bad_arguments�s.� z;test_factory.<locals>.TestABC.test_issubclass_bad_argumentscs^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>.ANrbrrrrr^�sr^rcs"eZdZdZ��fdd�Z�ZS)zHtest_factory.<locals>.TestABC.test_all_new_methods_are_called.<locals>.Brcs�jd7_t��|�Sr_)�counterr�__new__r()rdrrrr��szPtest_factory.<locals>.TestABC.test_all_new_methods_are_called.<locals>.B.__new__)rrrr�r�rr�rdrrrd�srdc@seZdZdS)zHtest_factory.<locals>.TestABC.test_all_new_methods_are_called.<locals>.CNrbrrrrr�srrr`)rPr"r�)rr^rr%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��basesrarrr��szftest_factory.<locals>.TestABC.test_tricky_new_works.<locals>.with_metaclass.<locals>.metaclass.__new__N)rrrr�rr�rrr�srZtemporary_classr)r9r�)rar�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>.ANrbrrrrr^�sr^c@seZdZdS)z>test_factory.<locals>.TestABC.test_tricky_new_works.<locals>.BNrbrrrrrd�srdc@seZdZdS)z>test_factory.<locals>.TestABC.test_tricky_new_works.<locals>.CNrbrrrrr�sr)r"r)rr�r^rdrr%rr�test_tricky_new_works�s
z3test_factory.<locals>.TestABC.test_tricky_new_worksN)rrrr;r<r'r.r4rFrQr\rcrlrmrqrvryr{r~r�r�r�r�rrorr�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_ABC�sr�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�ReceivesClassKwargs�sr�c@seZdZdS)z]test_factory.<locals>.TestABCWithInitSubclass.test_works_with_init_subclass.<locals>.ReceiverNrbrrrr�Receiver�sr�r`�r
)r]�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&rpr5r�r�rror�test_factorys8r��__main__)�__doc__r�rZ_py_abc�inspectrr�r:�get_cache_tokenZTestLegacyAPI_PyZ
TestABC_PyZTestABCWithInitSubclass_PyZTestLegacyAPI_CZ	TestABC_CZTestABCWithInitSubclass_Cr�mainrrrr�<module>s [�
�


F1le Man4ger