HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/local/lib/python3.10/test/__pycache__/test_genericclass.cpython-310.pyc
o

�i!%�@shddlZddlmZGdd�dej�ZGdd�dej�ZejGdd�dej��Zed	kr2e�	�dSdS)
�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@�eZdZdS)z0TestMROEntry.test_mro_entry_signature.<locals>.BN��__name__�
__module__�__qualname__�r	r	�3/usr/local/lib/python3.10/test/test_genericclass.py�B�rc�eZdZ��fdd�ZdS)z0TestMROEntry.test_mro_entry_signature.<locals>.Ccs��||g��fS�N��extend)�self�args�kwargs��C�testedr	r
�__mro_entries__
sz@TestMROEntry.test_mro_entry_signature.<locals>.C.__mro_entries__N�rrrrr	rr	r
r	�rc@r)z0TestMROEntry.test_mro_entry_signature.<locals>.DNrr	r	r	r
�Drrr�)�assertEqual)rr�crr	rr
�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@r)z&TestMROEntry.test_mro_entry.<locals>.ANrr	r	r	r
�Arrc@r)z&TestMROEntry.test_mro_entry.<locals>.BNrr	r	r	r
rrrc�eZdZ�fdd�ZdS)z&TestMROEntry.test_mro_entry.<locals>.Ccs��|�|jfSr)�append�	__class__�r�bases�rr	r
rs
z6TestMROEntry.test_mro_entry.<locals>.C.__mro_entries__Nrr	r%r	r
r�rc@r)z&TestMROEntry.test_mro_entry.<locals>.DNrr	r	r	r
rrr���c@r)z&TestMROEntry.test_mro_entry.<locals>.ENrr	r	r	r
�E#rr(�r�	__bases__�__orig_bases__�__mro__�object)rrrrrr�dr(r	r%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@r)z+TestMROEntry.test_mro_entry_none.<locals>.ANrr	r	r	r
r)rrc@r)z+TestMROEntry.test_mro_entry_none.<locals>.BNrr	r	r	r
r*rrcr )z+TestMROEntry.test_mro_entry_none.<locals>.Ccs��|�dS�Nr	�r!r#r%r	r
r,s
z;TestMROEntry.test_mro_entry_none.<locals>.C.__mro_entries__Nrr	r%r	r
r+r&rc@r)z+TestMROEntry.test_mro_entry_none.<locals>.DNrr	r	r	r
r1rrr'c@r)z+TestMROEntry.test_mro_entry_none.<locals>.ENrr	r	r	r
r(6rr(r))rrrrrrr(r	r%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@r)z4TestMROEntry.test_mro_entry_with_builtins.<locals>.ANrr	r	r	r
r>rrcr )z4TestMROEntry.test_mro_entry_with_builtins.<locals>.Ccs��|�tfSr)r!�dictr#r%r	r
r@�
zDTestMROEntry.test_mro_entry_with_builtins.<locals>.C.__mro_entries__Nrr	r%r	r
r?r&rc@r)z4TestMROEntry.test_mro_entry_with_builtins.<locals>.DNrr	r	r	r
rErrr')rr*r3r+r,r-)rrrrrr	r%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)Ncr
)z6TestMROEntry.test_mro_entry_with_builtins_2.<locals>.Ccs��|��fSrr1r#rr	r
rNr4zFTestMROEntry.test_mro_entry_with_builtins_2.<locals>.C.__mro_entries__Nrr	rr	r
rMrrc@r)z6TestMROEntry.test_mro_entry_with_builtins_2.<locals>.DNrr	r	r	r
rSrrr')rr3r*r+r,r-)rrrr	rr
�test_mro_entry_with_builtins_2Ksz+TestMROEntry.test_mro_entry_with_builtins_2cCs�Gdd�d�}|�}|�t��Gdd�d|�}Wd�n1s"wYGdd�d�}|�}|�t��Gdd�d|�}Wd�dS1sJwYdS)Nc@�eZdZdd�ZdS)z6TestMROEntry.test_mro_entry_errors.<locals>.C_too_manycS�dSr0r	)rr$Z	something�otherr	r	r
r[�zFTestMROEntry.test_mro_entry_errors.<locals>.C_too_many.__mro_entries__Nrr	r	r	r
�
C_too_manyZ�r;c@r�z-TestMROEntry.test_mro_entry_errors.<locals>.DNrr	r	r	r
r_rrc@r7)z5TestMROEntry.test_mro_entry_errors.<locals>.C_too_fewcSr8r0r	�rr	r	r
rar:zETestMROEntry.test_mro_entry_errors.<locals>.C_too_few.__mro_entries__Nrr	r	r	r
�	C_too_few`r<r?c@rr=rr	r	r	r
rer��assertRaises�	TypeError)rr;rrr?r.r	r	r
�test_mro_entry_errorsYs�"�z"TestMROEntry.test_mro_entry_errorscCs�Gdd�d�}|�}|�t��Gdd�d|�}Wd�n1s"wYGdd�d�}|�}|�t��Gdd�d|�}Wd�dS1sJwYdS)Nc@�eZdZdZdS)z<TestMROEntry.test_mro_entry_errors_2.<locals>.C_not_callable�	Surprise!Nrr	r	r	r
�C_not_callableh�rFc@r�z/TestMROEntry.test_mro_entry_errors_2.<locals>.DNrr	r	r	r
rlrrc@r7)z9TestMROEntry.test_mro_entry_errors_2.<locals>.C_not_tuplecSstSr)r-r>r	r	r
rnr:zITestMROEntry.test_mro_entry_errors_2.<locals>.C_not_tuple.__mro_entries__Nrr	r	r	r
�C_not_tuplemr<rIc@rrHrr	r	r	r
rrrr@)rrFrrrIr	r	r
�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_argsr	r
rLwsz;TestMROEntry.test_mro_entry_metaclass.<locals>.Meta.__new__)rrrrL�
__classcell__r	)rP)r"r
�MetavsrRc@r)z0TestMROEntry.test_mro_entry_metaclass.<locals>.ANrr	r	r	r
rzrrcr )z0TestMROEntry.test_mro_entry_metaclass.<locals>.Ccs�fSrr	r#�rr	r
r|sz@TestMROEntry.test_mro_entry_metaclass.<locals>.C.__mro_entries__Nrr	rSr	r
r{r&rc@rD)z0TestMROEntry.test_mro_entry_metaclass.<locals>.DrN)rrr�xr	r	r	r
rrGr��	metaclassrr��rT)�typerr*r+r,r-r")rrRrrrr	)rrPr
�test_mro_entry_metaclasstsz%TestMROEntry.test_mro_entry_metaclasscCsTGdd�d�}|�}|�td��td|fi�Wd�dS1s#wYdS)Nc@r7)z0TestMROEntry.test_mro_entry_type_call.<locals>.CcSr8r0r	r#r	r	r
r�r:z@TestMROEntry.test_mro_entry_type_call.<locals>.C.__mro_entries__Nrr	r	r	r
r�r<rz+MRO entry resolution; use types.new_class()ZBad)ZassertRaisesRegexrBrY)rrrr	r	r
�test_mro_entry_type_call�s�"�z%TestMROEntry.test_mro_entry_type_callN)rrrrr/r2r5r6rCrJrZr[r	r	r	r
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)Ncr )z.TestClassGetitem.test_class_getitem.<locals>.Ccs��||g�dSrr)rr�Zgetitem_argsr	r
�__class_getitem__�sz@TestClassGetitem.test_class_getitem.<locals>.C.__class_getitem__N�rrrr^r	r]r	r
r�r&rrr)�int�strr�rrr	r]r
�test_class_getitem�s
z#TestClassGetitem.test_class_getitemcCs2Gdd�d�}|�|td�|�||d�dS)Nc@r7)z5TestClassGetitem.test_class_getitem_format.<locals>.CcSsd|j�d�S)NzC[�]�r��cls�itemr	r	r
r^�szGTestClassGetitem.test_class_getitem_format.<locals>.C.__class_getitem__Nr_r	r	r	r
r�r<r�C[int]zC[C]�rr`rbr	r	r
�test_class_getitem_format�sz*TestClassGetitem.test_class_getitem_formatcC�BGdd�d�}Gdd�d|�}|�|td�|�||d�dS)Nc@r7)z:TestClassGetitem.test_class_getitem_inheritance.<locals>.CcS�|j�d|j�d�S�N�[rdrerfr	r	r
r^��zLTestClassGetitem.test_class_getitem_inheritance.<locals>.C.__class_getitem__Nr_r	r	r	r
r�r<rc@r)z:TestClassGetitem.test_class_getitem_inheritance.<locals>.DNrr	r	r	r
r�rr�D[int]�D[D]rj�rrrr	r	r
�test_class_getitem_inheritance�sz/TestClassGetitem.test_class_getitem_inheritancecCrl)Nc@r7)z<TestClassGetitem.test_class_getitem_inheritance_2.<locals>.CcSr8)NzShould not see thisr	rfr	r	r
r^�r:zNTestClassGetitem.test_class_getitem_inheritance_2.<locals>.C.__class_getitem__Nr_r	r	r	r
r�r<rc@r7)z<TestClassGetitem.test_class_getitem_inheritance_2.<locals>.DcSrmrnrerfr	r	r
r^�rpzNTestClassGetitem.test_class_getitem_inheritance_2.<locals>.D.__class_getitem__Nr_r	r	r	r
r�r<rrqrrrjrsr	r	r
� test_class_getitem_inheritance_2�sz1TestClassGetitem.test_class_getitem_inheritance_2cCrl)Nc@seZdZedd��ZdS)z:TestClassGetitem.test_class_getitem_classmethod.<locals>.CcSrmrnrerfr	r	r
r^�szLTestClassGetitem.test_class_getitem_classmethod.<locals>.C.__class_getitem__N)rrr�classmethodr^r	r	r	r
r�src@r)z:TestClassGetitem.test_class_getitem_classmethod.<locals>.DNrr	r	r	r
r�rrrqrrrjrsr	r	r
�test_class_getitem_classmethod�sz/TestClassGetitem.test_class_getitem_classmethodcCrl)Nc@r7)z6TestClassGetitem.test_class_getitem_patched.<locals>.CcSsdd�}t|�|_dS)NcSrmrnrerfr	r	r
r^�rpzcTestClassGetitem.test_class_getitem_patched.<locals>.C.__init_subclass__.<locals>.__class_getitem__)rvr^)rgr^r	r	r
�__init_subclass__�szHTestClassGetitem.test_class_getitem_patched.<locals>.C.__init_subclass__N)rrrrxr	r	r	r
r�r<rc@r)z6TestClassGetitem.test_class_getitem_patched.<locals>.DNrr	r	r	r
r�rrrqrrrjrsr	r	r
�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_withrfr	r	r
r^�s
zNTestClassGetitem.test_class_getitem_with_builtins.<locals>.A.__class_getitem__)rrrrzr^r	r	r	r
r�src@r)z<TestClassGetitem.test_class_getitem_with_builtins.<locals>.BNrr	r	r	r
r��r)r3�assertIsrzr`)rrrr	r	r
� test_class_getitem_with_builtins�s
z1TestClassGetitem.test_class_getitem_with_builtinscCs�Gdd�d�}|�t��|tWd�n1swYGdd�d�}|�t��
|tWd�dS1s<wYdS)Nc@r7)z=TestClassGetitem.test_class_getitem_errors.<locals>.C_too_fewcS�dSrr	)rgr	r	r
r^�r:zOTestClassGetitem.test_class_getitem_errors.<locals>.C_too_few.__class_getitem__Nr_r	r	r	r
r?�r<r?c@r7)z>TestClassGetitem.test_class_getitem_errors.<locals>.C_too_manycSr~rr	)rgZoneZtwor	r	r
r^�r:zPTestClassGetitem.test_class_getitem_errors.<locals>.C_too_many.__class_getitem__Nr_r	r	r	r
r;�r<r;)rArBr`)rr?r;r	r	r
�test_class_getitem_errors�s
�
"�z*TestClassGetitem.test_class_getitem_errorscCs�Gdd�d�}|�t��
|�tWd�n1swYGdd�d�}|�}dd�|_|�t��|tWd�n1sDwYGdd�d�}|�t��
|tWd�dS1sewYdS)	Nc@r7)z7TestClassGetitem.test_class_getitem_errors_2.<locals>.CcSr~rr	rfr	r	r
r^�r:zITestClassGetitem.test_class_getitem_errors_2.<locals>.C.__class_getitem__Nr_r	r	r	r
r�r<rc@r)z7TestClassGetitem.test_class_getitem_errors_2.<locals>.ENrr	r	r	r
r(�rr(cSr8)NzThis will not workr	rfr	r	r
�<lambda>�sz>TestClassGetitem.test_class_getitem_errors_2.<locals>.<lambda>c@rD)zDTestClassGetitem.test_class_getitem_errors_2.<locals>.C_not_callablerENr_r	r	r	r
rF�rGrF)rArBr`r^)rrr(�erFr	r	r
�test_class_getitem_errors_2�s�

�
"�z,TestClassGetitem.test_class_getitem_errors_2cCs$Gdd�dt�}|�|td�dS)Nc@r7)z;TestClassGetitem.test_class_getitem_metaclass.<locals>.MetacSrmrnrerfr	r	r
r^�rpzMTestClassGetitem.test_class_getitem_metaclass.<locals>.Meta.__class_getitem__Nr_r	r	r	r
rR�r<rRz	Meta[int]�rYrr`)rrRr	r	r
�test_class_getitem_metaclass�sz-TestClassGetitem.test_class_getitem_metaclasscC�6Gdd�dt�}Gdd�d|d�}|�|td�dS)Nc@r)z@TestClassGetitem.test_class_getitem_with_metaclass.<locals>.MetaNrr	r	r	r
rR�rrRc@r7)z=TestClassGetitem.test_class_getitem_with_metaclass.<locals>.CcSrmrnrerfr	r	r
r^�rpzOTestClassGetitem.test_class_getitem_with_metaclass.<locals>.C.__class_getitem__Nr_r	r	r	r
r�r<rrUrir��rrRrr	r	r
�!test_class_getitem_with_metaclass�sz2TestClassGetitem.test_class_getitem_with_metaclasscCr�)Nc@r7)zATestClassGetitem.test_class_getitem_metaclass_first.<locals>.MetacSr8)N�from metaclassr	rfr	r	r
�__getitem__r:zMTestClassGetitem.test_class_getitem_metaclass_first.<locals>.Meta.__getitem__N)rrrr�r	r	r	r
rRr<rRc@r7)z>TestClassGetitem.test_class_getitem_metaclass_first.<locals>.CcSr8)Nzfrom __class_getitem__r	rfr	r	r
r^r:zPTestClassGetitem.test_class_getitem_metaclass_first.<locals>.C.__class_getitem__Nr_r	r	r	r
rr<rrUr�r�r�r	r	r
�"test_class_getitem_metaclass_firstsz3TestClassGetitem.test_class_getitem_metaclass_firstN)rrrrcrkrtrurwryr}rr�r�r�r�r	r	r	r
r\�s

	
r\c@r7)�CAPITestcCs�ddlm}m}|�|�t�|�|t}|�t|�|�|�|�	d�tf�Gdd�d|�}|�|j
tf�|�|j|f�|�|j|tt
f�dS)Nr)�Generic�GenericAliasr	c@r)z CAPITest.test_c_class.<locals>.CNrr	r	r	r
rr{r)Z	_testcapir�r�ZassertIsInstancer^r`r|rYrrr*r+r,r-)rr�r�Z
IntGenericrr	r	r
�test_c_classszCAPITest.test_c_classN)rrrr�r	r	r	r
r�sr��__main__)
Zunittest�testrZTestCaserr\Zcpython_onlyr�r�mainr	r	r	r
�<module>sv�