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_genericclass.cpython-39.pyc

a

��g!%�@sdddlZddlmZGdd�dej�ZGdd�dej�ZejGdd�dej��Zed	kr`e�	�dS)
�N)�supportc@sTeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�ZdS)�TestMROEntrycstg�Gdd�d�}G��fdd�d����}|��g�Gdd�d||�}|��d||ff�|��di�dS)	Nc@seZdZdS)z0TestMROEntry.test_mro_entry_signature.<locals>.BN��__name__�
__module__�__qualname__�rr�2/usr/local/lib/python3.9/test/test_genericclass.py�B�r
cseZdZ��fdd�ZdS)z0TestMROEntry.test_mro_entry_signature.<locals>.Ccs��||g��fS�N��extend)�self�args�kwargs��C�testedrr	�__mro_entries__
sz@TestMROEntry.test_mro_entry_signature.<locals>.C.__mro_entries__N�rrrrrrrr	r	src@seZdZdS)z0TestMROEntry.test_mro_entry_signature.<locals>.DNrrrrr	�Drrr�)�assertEqual)rr
�crrrr	�test_mro_entry_signaturesz%TestMROEntry.test_mro_entry_signaturecs�g�Gdd�d�}Gdd�d�}G�fdd�d�}|�}|��g�Gdd�d|||�}|��d	|||f�|�|j|||f�|�|j|||f�|�|j||||tf�|�}Gd
d�d|�}|��d	|f�|�|j|f�dS)Nc@seZdZdS)z&TestMROEntry.test_mro_entry.<locals>.ANrrrrr	�Arrc@seZdZdS)z&TestMROEntry.test_mro_entry.<locals>.BNrrrrr	r
rr
cseZdZ�fdd�ZdS)z&TestMROEntry.test_mro_entry.<locals>.Ccs��|�|jfSr)�append�	__class__�r�bases�rrr	rs
z6TestMROEntry.test_mro_entry.<locals>.C.__mro_entries__Nrrr!rr	rsrc@seZdZdS)z&TestMROEntry.test_mro_entry.<locals>.DNrrrrr	rrr���c@seZdZdS)z&TestMROEntry.test_mro_entry.<locals>.ENrrrrr	�E#rr#�r�	__bases__�__orig_bases__�__mro__�object)rrr
rrr�dr#rr!r	�test_mro_entryszTestMROEntry.test_mro_entrycsg�Gdd�d�}Gdd�d�}G�fdd�d�}|�}|��g�Gdd�d|||�}|��d	|||f�|�|j||f�|�|j|||f�|�|j|||tf�Gd
d�d|�}|��d	|f�|�|jtf�|�|j|f�|�|j|tf�dS)Nc@seZdZdS)z+TestMROEntry.test_mro_entry_none.<locals>.ANrrrrr	r)rrc@seZdZdS)z+TestMROEntry.test_mro_entry_none.<locals>.BNrrrrr	r
*rr
cseZdZ�fdd�ZdS)z+TestMROEntry.test_mro_entry_none.<locals>.Ccs��|�dS�Nr�rrr!rr	r,s
z;TestMROEntry.test_mro_entry_none.<locals>.C.__mro_entries__Nrrr!rr	r+src@seZdZdS)z+TestMROEntry.test_mro_entry_none.<locals>.DNrrrrr	r1rrr"c@seZdZdS)z+TestMROEntry.test_mro_entry_none.<locals>.ENrrrrr	r#6rr#r$)rrr
rrrr#rr!r	�test_mro_entry_none's z TestMROEntry.test_mro_entry_nonecs�g�Gdd�d�}G�fdd�d�}|�}|��g�Gdd�d||�}|��d||f�|�|j|tf�|�|j||f�|�|j||ttf�dS)Nc@seZdZdS)z4TestMROEntry.test_mro_entry_with_builtins.<locals>.ANrrrrr	r>rrcseZdZ�fdd�ZdS)z4TestMROEntry.test_mro_entry_with_builtins.<locals>.Ccs��|�tfSr)r�dictrr!rr	r@s
zDTestMROEntry.test_mro_entry_with_builtins.<locals>.C.__mro_entries__Nrrr!rr	r?src@seZdZdS)z4TestMROEntry.test_mro_entry_with_builtins.<locals>.DNrrrrr	rErrr")rr%r.r&r'r()rrrrrrr!r	�test_mro_entry_with_builtins<sz)TestMROEntry.test_mro_entry_with_builtinscs�g�G��fdd�d����}|��g�Gdd�d|t�}|��d|tf�|�|j�tf�|�|j|tf�|�|j|�ttf�dS)NcseZdZ��fdd�ZdS)z6TestMROEntry.test_mro_entry_with_builtins_2.<locals>.Ccs��|��fSrr,rrrr	rNs
zFTestMROEntry.test_mro_entry_with_builtins_2.<locals>.C.__mro_entries__Nrrrrr	rMsrc@seZdZdS)z6TestMROEntry.test_mro_entry_with_builtins_2.<locals>.DNrrrrr	rSrrr")rr.r%r&r'r()rrrrrr	�test_mro_entry_with_builtins_2Ksz+TestMROEntry.test_mro_entry_with_builtins_2cCs�Gdd�d�}|�}|�t�� Gdd�d|�}Wd�n1sD0YGdd�d�}|�}|�t�� Gdd�d|�}Wd�n1s�0YdS)Nc@seZdZdd�ZdS)z6TestMROEntry.test_mro_entry_errors.<locals>.C_too_manycSsdSr+r)rr Z	something�otherrrr	r[szFTestMROEntry.test_mro_entry_errors.<locals>.C_too_many.__mro_entries__Nrrrrr	�
C_too_manyZsr2c@seZdZdS�z-TestMROEntry.test_mro_entry_errors.<locals>.DNrrrrr	r_rrc@seZdZdd�ZdS)z5TestMROEntry.test_mro_entry_errors.<locals>.C_too_fewcSsdSr+r�rrrr	raszETestMROEntry.test_mro_entry_errors.<locals>.C_too_few.__mro_entries__Nrrrrr	�	C_too_few`sr5c@seZdZdSr3rrrrr	rer��assertRaises�	TypeError)rr2rrr5r)rrr	�test_mro_entry_errorsYs.z"TestMROEntry.test_mro_entry_errorscCs�Gdd�d�}|�}|�t�� Gdd�d|�}Wd�n1sD0YGdd�d�}|�}|�t�� Gdd�d|�}Wd�n1s�0YdS)Nc@seZdZdZdS)z<TestMROEntry.test_mro_entry_errors_2.<locals>.C_not_callable�	Surprise!Nrrrrr	�C_not_callablehsr;c@seZdZdS�z/TestMROEntry.test_mro_entry_errors_2.<locals>.DNrrrrr	rlrrc@seZdZdd�ZdS)z9TestMROEntry.test_mro_entry_errors_2.<locals>.C_not_tuplecSstSr)r(r4rrr	rnszITestMROEntry.test_mro_entry_errors_2.<locals>.C_not_tuple.__mro_entries__Nrrrrr	�C_not_tuplemsr=c@seZdZdSr<rrrrr	rrrr6)rr;rrr=rrr	�test_mro_entry_errors_2gs.z$TestMROEntry.test_mro_entry_errors_2cs�g�G�fdd�dt�}Gdd�d��G�fdd�d�}|�}Gdd�d||d	�}|��d
|�|��dd�|��d�f�|��d
dd�|�|j�f�|�|j|f�|�|j|�tf�|�|j|�dS)NcseZdZ��fdd�Z�ZS)z3TestMROEntry.test_mro_entry_metaclass.<locals>.Metacs$��||||g�t��||||�Sr)r�super�__new__)�mcls�namer �ns)r�	meta_argsrr	r@wsz;TestMROEntry.test_mro_entry_metaclass.<locals>.Meta.__new__)rrrr@�
__classcell__r)rD)rr	�MetavsrFc@seZdZdS)z0TestMROEntry.test_mro_entry_metaclass.<locals>.ANrrrrr	rzrrcseZdZ�fdd�ZdS)z0TestMROEntry.test_mro_entry_metaclass.<locals>.Ccs�fSrrr�rrr	r|sz@TestMROEntry.test_mro_entry_metaclass.<locals>.C.__mro_entries__NrrrGrr	r{src@seZdZdZdS)z0TestMROEntry.test_mro_entry_metaclass.<locals>.DrN)rrr�xrrrr	rsr��	metaclassrr��rH)�typerr%r&r'r(r)rrFrrrr)rrDr	�test_mro_entry_metaclasstsz%TestMROEntry.test_mro_entry_metaclasscCsRGdd�d�}|�}|�td��td|fi�Wd�n1sD0YdS)Nc@seZdZdd�ZdS)z0TestMROEntry.test_mro_entry_type_call.<locals>.CcSsdSr+rrrrr	r�sz@TestMROEntry.test_mro_entry_type_call.<locals>.C.__mro_entries__Nrrrrr	r�srz+MRO entry resolution; use types.new_class()ZBad)ZassertRaisesRegexr8rM)rrrrrr	�test_mro_entry_type_call�s�z%TestMROEntry.test_mro_entry_type_callN)rrrrr*r-r/r0r9r>rNrOrrrr	rs

rc@sleZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�ZdS)�TestClassGetitemcsNg�G�fdd�d�}|ttf|��d|ttff�|��di�dS)NcseZdZ�fdd�ZdS)z.TestClassGetitem.test_class_getitem.<locals>.Ccs��||g�dSrr
)rr�Zgetitem_argsrr	�__class_getitem__�sz@TestClassGetitem.test_class_getitem.<locals>.C.__class_getitem__N�rrrrRrrQrr	r�srrr)�int�strr�rrrrQr	�test_class_getitem�s
z#TestClassGetitem.test_class_getitemcCs2Gdd�d�}|�|td�|�||d�dS)Nc@seZdZdd�ZdS)z5TestClassGetitem.test_class_getitem_format.<locals>.CcSsd|j�d�S)NzC[�]�r��cls�itemrrr	rR�szGTestClassGetitem.test_class_getitem_format.<locals>.C.__class_getitem__NrSrrrr	r�sr�C[int]zC[C]�rrTrVrrr	�test_class_getitem_format�sz*TestClassGetitem.test_class_getitem_formatcCsBGdd�d�}Gdd�d|�}|�|td�|�||d�dS)Nc@seZdZdd�ZdS)z:TestClassGetitem.test_class_getitem_inheritance.<locals>.CcSs|j�d|j�d�S�N�[rXrYrZrrr	rR�szLTestClassGetitem.test_class_getitem_inheritance.<locals>.C.__class_getitem__NrSrrrr	r�src@seZdZdS)z:TestClassGetitem.test_class_getitem_inheritance.<locals>.DNrrrrr	r�rr�D[int]�D[D]r^�rrrrrr	�test_class_getitem_inheritance�sz/TestClassGetitem.test_class_getitem_inheritancecCsBGdd�d�}Gdd�d|�}|�|td�|�||d�dS)Nc@seZdZdd�ZdS)z<TestClassGetitem.test_class_getitem_inheritance_2.<locals>.CcSsdS)NzShould not see thisrrZrrr	rR�szNTestClassGetitem.test_class_getitem_inheritance_2.<locals>.C.__class_getitem__NrSrrrr	r�src@seZdZdd�ZdS)z<TestClassGetitem.test_class_getitem_inheritance_2.<locals>.DcSs|j�d|j�d�Sr`rYrZrrr	rR�szNTestClassGetitem.test_class_getitem_inheritance_2.<locals>.D.__class_getitem__NrSrrrr	r�srrbrcr^rdrrr	� test_class_getitem_inheritance_2�sz1TestClassGetitem.test_class_getitem_inheritance_2cCsBGdd�d�}Gdd�d|�}|�|td�|�||d�dS)Nc@seZdZedd��ZdS)z:TestClassGetitem.test_class_getitem_classmethod.<locals>.CcSs|j�d|j�d�Sr`rYrZrrr	rR�szLTestClassGetitem.test_class_getitem_classmethod.<locals>.C.__class_getitem__N)rrr�classmethodrRrrrr	r�src@seZdZdS)z:TestClassGetitem.test_class_getitem_classmethod.<locals>.DNrrrrr	r�rrrbrcr^rdrrr	�test_class_getitem_classmethod�sz/TestClassGetitem.test_class_getitem_classmethodcCsBGdd�d�}Gdd�d|�}|�|td�|�||d�dS)Nc@seZdZdd�ZdS)z6TestClassGetitem.test_class_getitem_patched.<locals>.CcSsdd�}t|�|_dS)NcSs|j�d|j�d�Sr`rYrZrrr	rR�szcTestClassGetitem.test_class_getitem_patched.<locals>.C.__init_subclass__.<locals>.__class_getitem__)rgrR)r[rRrrr	�__init_subclass__�szHTestClassGetitem.test_class_getitem_patched.<locals>.C.__init_subclass__N)rrrrirrrr	r�src@seZdZdS)z6TestClassGetitem.test_class_getitem_patched.<locals>.DNrrrrr	r�rrrbrcr^rdrrr	�test_class_getitem_patched�sz+TestClassGetitem.test_class_getitem_patchedcCsHGdd�dt�}Gdd�d|�}|�|jd�|t|�|jt�dS)Nc@seZdZdZdd�ZdS)z<TestClassGetitem.test_class_getitem_with_builtins.<locals>.ANcSs
||_dSr)�called_withrZrrr	rR�szNTestClassGetitem.test_class_getitem_with_builtins.<locals>.A.__class_getitem__)rrrrkrRrrrr	r�src@seZdZdS)z<TestClassGetitem.test_class_getitem_with_builtins.<locals>.BNrrrrr	r
�sr
)r.�assertIsrkrT)rrr
rrr	� test_class_getitem_with_builtins�s
z1TestClassGetitem.test_class_getitem_with_builtinscCs�Gdd�d�}|�t��|tWd�n1s60YGdd�d�}|�t��|tWd�n1sv0YdS)Nc@seZdZdd�ZdS)z=TestClassGetitem.test_class_getitem_errors.<locals>.C_too_fewcSsdSrr)r[rrr	rR�szOTestClassGetitem.test_class_getitem_errors.<locals>.C_too_few.__class_getitem__NrSrrrr	r5�sr5c@seZdZdd�ZdS)z>TestClassGetitem.test_class_getitem_errors.<locals>.C_too_manycSsdSrr)r[ZoneZtworrr	rR�szPTestClassGetitem.test_class_getitem_errors.<locals>.C_too_many.__class_getitem__NrSrrrr	r2�sr2)r7r8rT)rr5r2rrr	�test_class_getitem_errors�s&z*TestClassGetitem.test_class_getitem_errorscCs�Gdd�d�}|�t��|�tWd�n1s80YGdd�d�}|�}dd�|_|�t��|tWd�n1s�0YGdd�d�}|�t��|tWd�n1s�0YdS)	Nc@seZdZdd�ZdS)z7TestClassGetitem.test_class_getitem_errors_2.<locals>.CcSsdSrrrZrrr	rR�szITestClassGetitem.test_class_getitem_errors_2.<locals>.C.__class_getitem__NrSrrrr	r�src@seZdZdS)z7TestClassGetitem.test_class_getitem_errors_2.<locals>.ENrrrrr	r#�rr#cSsdS)NzThis will not workrrZrrr	�<lambda>�rz>TestClassGetitem.test_class_getitem_errors_2.<locals>.<lambda>c@seZdZdZdS)zDTestClassGetitem.test_class_getitem_errors_2.<locals>.C_not_callabler:NrSrrrr	r;�sr;)r7r8rTrR)rrr#�er;rrr	�test_class_getitem_errors_2�s(
&z,TestClassGetitem.test_class_getitem_errors_2cCs$Gdd�dt�}|�|td�dS)Nc@seZdZdd�ZdS)z;TestClassGetitem.test_class_getitem_metaclass.<locals>.MetacSs|j�d|j�d�Sr`rYrZrrr	rR�szMTestClassGetitem.test_class_getitem_metaclass.<locals>.Meta.__class_getitem__NrSrrrr	rF�srFz	Meta[int]�rMrrT)rrFrrr	�test_class_getitem_metaclass�sz-TestClassGetitem.test_class_getitem_metaclasscCs6Gdd�dt�}Gdd�d|d�}|�|td�dS)Nc@seZdZdS)z@TestClassGetitem.test_class_getitem_with_metaclass.<locals>.MetaNrrrrr	rF�rrFc@seZdZdd�ZdS)z=TestClassGetitem.test_class_getitem_with_metaclass.<locals>.CcSs|j�d|j�d�Sr`rYrZrrr	rR�szOTestClassGetitem.test_class_getitem_with_metaclass.<locals>.C.__class_getitem__NrSrrrr	r�srrIr]rr�rrFrrrr	�!test_class_getitem_with_metaclass�sz2TestClassGetitem.test_class_getitem_with_metaclasscCs6Gdd�dt�}Gdd�d|d�}|�|td�dS)Nc@seZdZdd�ZdS)zATestClassGetitem.test_class_getitem_metaclass_first.<locals>.MetacSsdS)N�from metaclassrrZrrr	�__getitem__szMTestClassGetitem.test_class_getitem_metaclass_first.<locals>.Meta.__getitem__N)rrrrwrrrr	rFsrFc@seZdZdd�ZdS)z>TestClassGetitem.test_class_getitem_metaclass_first.<locals>.CcSsdS)Nzfrom __class_getitem__rrZrrr	rRszPTestClassGetitem.test_class_getitem_metaclass_first.<locals>.C.__class_getitem__NrSrrrr	rsrrIrvrrrtrrr	�"test_class_getitem_metaclass_firstsz3TestClassGetitem.test_class_getitem_metaclass_firstN)rrrrWr_rerfrhrjrmrnrqrsrurxrrrr	rP�s

	
rPc@seZdZdd�ZdS)�CAPITestcCs�ddlm}m}|�|�t�|�|t}|�t|�|�|�|�	d�tf�Gdd�d|�}|�|j
tf�|�|j|f�|�|j|tt
f�dS)Nr)�Generic�GenericAliasrc@seZdZdS)z CAPITest.test_c_class.<locals>.CNrrrrr	rsr)Z	_testcapirzr{ZassertIsInstancerRrTrlrMrrr%r&r'r()rrzr{Z
IntGenericrrrr	�test_c_classszCAPITest.test_c_classN)rrrr|rrrr	rysry�__main__)
Zunittest�testrZTestCaserrPZcpython_onlyryr�mainrrrr	�<module>sv

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