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_genericclass.cpython-38.opt-2.pyc
U

>��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�5/opt/cppython/lib/python3.8/test/test_genericclass.py�Bsr
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	�Dsrr�)�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	�Asrc@seZdZdS)z&TestMROEntry.test_mro_entry.<locals>.BNrrrrr	r
sr
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	rsr���c@seZdZdS)z&TestMROEntry.test_mro_entry.<locals>.ENrrrrr	�E#sr"�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)src@seZdZdS)z+TestMROEntry.test_mro_entry_none.<locals>.BNrrrrr	r
*sr
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	r1srr!c@seZdZdS)z+TestMROEntry.test_mro_entry_none.<locals>.ENrrrrr	r"6sr"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>srcseZdZ�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	rEsrr!)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��|��fSrr+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	rSsrr!)rr-r$r%r&r')rrrrrr	�test_mro_entry_with_builtins_2Ksz+TestMROEntry.test_mro_entry_with_builtins_2c	CsxGdd�d�}|�}|�t��Gdd�d|�}W5QRXGdd�d�}|�}|�t��Gdd�d|�}W5QRXdS)Nc@seZdZdd�ZdS)z6TestMROEntry.test_mro_entry_errors.<locals>.C_too_manycSsdSr*r)rrZ	something�otherrrr	r[szFTestMROEntry.test_mro_entry_errors.<locals>.C_too_many.__mro_entries__Nrrrrr	�
C_too_manyZsr1c@seZdZdS�z-TestMROEntry.test_mro_entry_errors.<locals>.DNrrrrr	r_src@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`sr4c@seZdZdSr2rrrrr	res��assertRaises�	TypeError)rr1rrr4r(rrr	�test_mro_entry_errorsYsz"TestMROEntry.test_mro_entry_errorsc	CsxGdd�d�}|�}|�t��Gdd�d|�}W5QRXGdd�d�}|�}|�t��Gdd�d|�}W5QRXdS)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	rlsrc@seZdZdd�ZdS)z9TestMROEntry.test_mro_entry_errors_2.<locals>.C_not_tuplecSstSr)r'r3rrr	rnszITestMROEntry.test_mro_entry_errors_2.<locals>.C_not_tuple.__mro_entries__Nrrrrr	�C_not_tuplemsr<c@seZdZdSr;rrrrr	rrsr5)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)rC)rr	�MetavsrEc@seZdZdS)z0TestMROEntry.test_mro_entry_metaclass.<locals>.ANrrrrr	rzsrcseZdZ�fdd�ZdS)z0TestMROEntry.test_mro_entry_metaclass.<locals>.Ccs�fSrrr�rrr	r|sz@TestMROEntry.test_mro_entry_metaclass.<locals>.C.__mro_entries__NrrrFrr	r{src@seZdZdZdS)z0TestMROEntry.test_mro_entry_metaclass.<locals>.DrN)rrr�xrrrr	rsr��	metaclassrr��rG)�typerr$r%r&r'r)rrErrrr)rrCr	�test_mro_entry_metaclasstsz%TestMROEntry.test_mro_entry_metaclassc	Cs>Gdd�d�}|�}|�td��td|fi�W5QRXdS)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)ZassertRaisesRegexr7rL)rrrrrr	�test_mro_entry_type_call�s�z%TestMROEntry.test_mro_entry_type_callN)rrrrr)r,r.r/r8r=rMrNrrrr	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�dSrr)rr�Zgetitem_argsrr	�__class_getitem__�sz@TestClassGetitem.test_class_getitem.<locals>.C.__class_getitem__N�rrrrQrrPrr	r�srrr)�int�strr�rrrrPr	�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	rQ�szGTestClassGetitem.test_class_getitem_format.<locals>.C.__class_getitem__NrRrrrr	r�sr�C[int]zC[C]�rrSrUrrr	�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�[rWrXrYrrr	rQ�szLTestClassGetitem.test_class_getitem_inheritance.<locals>.C.__class_getitem__NrRrrrr	r�src@seZdZdS)z:TestClassGetitem.test_class_getitem_inheritance.<locals>.DNrrrrr	r�sr�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 thisrrYrrr	rQ�szNTestClassGetitem.test_class_getitem_inheritance_2.<locals>.C.__class_getitem__NrRrrrr	r�src@seZdZdd�ZdS)z<TestClassGetitem.test_class_getitem_inheritance_2.<locals>.DcSs|j�d|j�d�Sr_rXrYrrr	rQ�szNTestClassGetitem.test_class_getitem_inheritance_2.<locals>.D.__class_getitem__NrRrrrr	r�srrarbr]rcrrr	� 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_rXrYrrr	rQ�szLTestClassGetitem.test_class_getitem_classmethod.<locals>.C.__class_getitem__N)rrr�classmethodrQrrrr	r�src@seZdZdS)z:TestClassGetitem.test_class_getitem_classmethod.<locals>.DNrrrrr	r�srrarbr]rcrrr	�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_rXrYrrr	rQ�szcTestClassGetitem.test_class_getitem_patched.<locals>.C.__init_subclass__.<locals>.__class_getitem__)rfrQ)rZrQrrr	�__init_subclass__�szHTestClassGetitem.test_class_getitem_patched.<locals>.C.__init_subclass__N)rrrrhrrrr	r�src@seZdZdS)z6TestClassGetitem.test_class_getitem_patched.<locals>.DNrrrrr	r�srrarbr]rcrrr	�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_withrYrrr	rQ�szNTestClassGetitem.test_class_getitem_with_builtins.<locals>.A.__class_getitem__)rrrrjrQrrrr	r�src@seZdZdS)z<TestClassGetitem.test_class_getitem_with_builtins.<locals>.BNrrrrr	r
�sr
)r-�assertIsrjrS)rrr
rrr	� test_class_getitem_with_builtins�s
z1TestClassGetitem.test_class_getitem_with_builtinsc	Cs\Gdd�d�}|�t��|tW5QRXGdd�d�}|�t��|tW5QRXdS)Nc@seZdZdd�ZdS)z=TestClassGetitem.test_class_getitem_errors.<locals>.C_too_fewcSsdSrr)rZrrr	rQ�szOTestClassGetitem.test_class_getitem_errors.<locals>.C_too_few.__class_getitem__NrRrrrr	r4�sr4c@seZdZdd�ZdS)z>TestClassGetitem.test_class_getitem_errors.<locals>.C_too_manycSsdSrr)rZZoneZtworrr	rQ�szPTestClassGetitem.test_class_getitem_errors.<locals>.C_too_many.__class_getitem__NrRrrrr	r1�sr1)r6r7rS)rr4r1rrr	�test_class_getitem_errors�sz*TestClassGetitem.test_class_getitem_errorsc	Cs�Gdd�d�}|�t��|�tW5QRXGdd�d�}|�}dd�|_|�t��|tW5QRXGdd�d�}|�t��|tW5QRXdS)	Nc@seZdZdd�ZdS)z7TestClassGetitem.test_class_getitem_errors_2.<locals>.CcSsdSrrrYrrr	rQ�szITestClassGetitem.test_class_getitem_errors_2.<locals>.C.__class_getitem__NrRrrrr	r�src@seZdZdS)z7TestClassGetitem.test_class_getitem_errors_2.<locals>.ENrrrrr	r"�sr"cSsdS)NzThis will not workrrYrrr	�<lambda>��z>TestClassGetitem.test_class_getitem_errors_2.<locals>.<lambda>c@seZdZdZdS)zDTestClassGetitem.test_class_getitem_errors_2.<locals>.C_not_callabler9NrRrrrr	r:�sr:)r6r7rSrQ)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_rXrYrrr	rQ�szMTestClassGetitem.test_class_getitem_metaclass.<locals>.Meta.__class_getitem__NrRrrrr	rE�srEz	Meta[int]�rLrrS)rrErrr	�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	rE�srEc@seZdZdd�ZdS)z=TestClassGetitem.test_class_getitem_with_metaclass.<locals>.CcSs|j�d|j�d�Sr_rXrYrrr	rQ�szOTestClassGetitem.test_class_getitem_with_metaclass.<locals>.C.__class_getitem__NrRrrrr	r�srrHr\rr�rrErrrr	�!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 metaclassrrYrrr	�__getitem__szMTestClassGetitem.test_class_getitem_metaclass_first.<locals>.Meta.__getitem__N)rrrrwrrrr	rEsrEc@seZdZdd�ZdS)z>TestClassGetitem.test_class_getitem_metaclass_first.<locals>.CcSsdS)Nzfrom __class_getitem__rrYrrr	rQszPTestClassGetitem.test_class_getitem_metaclass_first.<locals>.C.__class_getitem__NrRrrrr	rsrrHrvrrrtrrr	�"test_class_getitem_metaclass_firstsz3TestClassGetitem.test_class_getitem_metaclass_firstN)rrrrVr^rdrergrirlrmrqrsrurxrrrr	rO�s

	
rOc@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{ZassertIsInstancerQrSrkrLrrr$r%r&r')rrzr{Z
IntGenericrrrr	�test_c_classszCAPITest.test_c_classN)rrrr|rrrr	rysry�__main__)
Zunittest�testrZTestCaserrOZcpython_onlyryr�mainrrrr	�<module>sv

F1le Man4ger