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.7/test/__pycache__/test_genericclass.cpython-37.pyc
B

��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.7/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)rrrrr)rrrrr	src@seZdZdS)z0TestMROEntry.test_mro_entry_signature.<locals>.DN)rrrrrrr�Dsrr�)�assertEqual)rr	�crr)rrr�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>.AN)rrrrrrr�Asrc@seZdZdS)z&TestMROEntry.test_mro_entry.<locals>.BN)rrrrrrrr	sr	cseZdZ�fdd�ZdS)z&TestMROEntry.test_mro_entry.<locals>.Ccs��|�|jfS)N)�append�	__class__)r�bases)rrrrs
z6TestMROEntry.test_mro_entry.<locals>.C.__mro_entries__N)rrrrr)rrrrsrc@seZdZdS)z&TestMROEntry.test_mro_entry.<locals>.DN)rrrrrrrrsr���c@seZdZdS)z&TestMROEntry.test_mro_entry.<locals>.EN)rrrrrrr�E#sr)r�	__bases__�__orig_bases__�__mro__�object)rrr	rrr�drr)rr�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>.AN)rrrrrrrr)src@seZdZdS)z+TestMROEntry.test_mro_entry_none.<locals>.BN)rrrrrrrr	*sr	cseZdZ�fdd�ZdS)z+TestMROEntry.test_mro_entry_none.<locals>.Ccs��|�dS)Nr)r)rr)rrrr,s
z;TestMROEntry.test_mro_entry_none.<locals>.C.__mro_entries__N)rrrrr)rrrr+src@seZdZdS)z+TestMROEntry.test_mro_entry_none.<locals>.DN)rrrrrrrr1srrc@seZdZdS)z+TestMROEntry.test_mro_entry_none.<locals>.EN)rrrrrrrr6sr)rrrrr)rrr	rrrrr)rr�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>.AN)rrrrrrrr>srcseZdZ�fdd�ZdS)z4TestMROEntry.test_mro_entry_with_builtins.<locals>.Ccs��|�tfS)N)r�dict)rr)rrrr@s
zDTestMROEntry.test_mro_entry_with_builtins.<locals>.C.__mro_entries__N)rrrrr)rrrr?src@seZdZdS)z4TestMROEntry.test_mro_entry_with_builtins.<locals>.DN)rrrrrrrrEsrr)rrr#rrr)rrrrrr)rr�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��|��fS)N)r)rr)rrrrrNs
zFTestMROEntry.test_mro_entry_with_builtins_2.<locals>.C.__mro_entries__N)rrrrr)rrrrrMsrc@seZdZdS)z6TestMROEntry.test_mro_entry_with_builtins_2.<locals>.DN)rrrrrrrrSsrr)rr#rrrr)rrrr)rrr�test_mro_entry_with_builtins_2Ksz+TestMROEntry.test_mro_entry_with_builtins_2c	CsxGdd�d�}|�}|�t��Gdd�d|�}WdQRXGdd�d�}|�}|�t��Gdd�d|�}WdQRXdS)Nc@seZdZdd�ZdS)z6TestMROEntry.test_mro_entry_errors.<locals>.C_too_manycSsdS)Nrr)rrZ	something�otherrrrr[szFTestMROEntry.test_mro_entry_errors.<locals>.C_too_many.__mro_entries__N)rrrrrrrr�
C_too_manyZsr'c@seZdZdS)z-TestMROEntry.test_mro_entry_errors.<locals>.DN)rrrrrrrr_src@seZdZdd�ZdS)z5TestMROEntry.test_mro_entry_errors.<locals>.C_too_fewcSsdS)Nrr)rrrrraszETestMROEntry.test_mro_entry_errors.<locals>.C_too_few.__mro_entries__N)rrrrrrrr�	C_too_few`sr(c@seZdZdS)z-TestMROEntry.test_mro_entry_errors.<locals>.DN)rrrrrrrres)�assertRaises�	TypeError)rr'rrr(r rrr�test_mro_entry_errorsYsz"TestMROEntry.test_mro_entry_errorsc	CsxGdd�d�}|�}|�t��Gdd�d|�}WdQRXGdd�d�}|�}|�t��Gdd�d|�}WdQRXdS)Nc@seZdZdZdS)z<TestMROEntry.test_mro_entry_errors_2.<locals>.C_not_callablez	Surprise!N)rrrrrrrr�C_not_callablehsr,c@seZdZdS)z/TestMROEntry.test_mro_entry_errors_2.<locals>.DN)rrrrrrrrlsrc@seZdZdd�ZdS)z9TestMROEntry.test_mro_entry_errors_2.<locals>.C_not_tuplecSstS)N)r)rrrrrnszITestMROEntry.test_mro_entry_errors_2.<locals>.C_not_tuple.__mro_entries__N)rrrrrrrr�C_not_tuplemsr-c@seZdZdS)z/TestMROEntry.test_mro_entry_errors_2.<locals>.DN)rrrrrrrrrs)r)r*)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��||||�S)N)r
�super�__new__)�mcls�namer�ns)r�	meta_argsrrr0wsz;TestMROEntry.test_mro_entry_metaclass.<locals>.Meta.__new__)rrrr0�
__classcell__r)r4)rr�Metavsr6c@seZdZdS)z0TestMROEntry.test_mro_entry_metaclass.<locals>.AN)rrrrrrrrzsrcseZdZ�fdd�ZdS)z0TestMROEntry.test_mro_entry_metaclass.<locals>.Ccs�fS)Nr)rr)rrrr|sz@TestMROEntry.test_mro_entry_metaclass.<locals>.C.__mro_entries__N)rrrrr)rrrr{src@seZdZdZdS)z0TestMROEntry.test_mro_entry_metaclass.<locals>.DrN)rrr�xrrrrrsr)�	metaclassrr��r7)�typerrrrrr)rr6rrrr)rr4r�test_mro_entry_metaclasstsz%TestMROEntry.test_mro_entry_metaclassc	Cs>Gdd�d�}|�}|�td��td|fi�WdQRXdS)Nc@seZdZdd�ZdS)z0TestMROEntry.test_mro_entry_type_call.<locals>.CcSsdS)Nrr)rrrrrr�sz@TestMROEntry.test_mro_entry_type_call.<locals>.C.__mro_entries__N)rrrrrrrrr�srz+MRO entry resolution; use types.new_class()ZBad)ZassertRaisesRegexr*r;)rrrrrr�test_mro_entry_type_call�s
z%TestMROEntry.test_mro_entry_type_callN)rrrrr!r"r$r%r+r.r<r=rrrrrs

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�dS)N)r
)rr
)�getitem_argsrr�__class_getitem__�sz@TestClassGetitem.test_class_getitem.<locals>.C.__class_getitem__N)rrrr@r)r?rrr�srrr)�int�strr)rrr)r?r�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�itemrrrr@�szGTestClassGetitem.test_class_getitem_format.<locals>.C.__class_getitem__N)rrrr@rrrrr�srzC[int]zC[C])rrA)rrrrr�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�[rD)r)rErFrrrr@�szLTestClassGetitem.test_class_getitem_inheritance.<locals>.C.__class_getitem__N)rrrr@rrrrr�src@seZdZdS)z:TestClassGetitem.test_class_getitem_inheritance.<locals>.DN)rrrrrrrr�srzD[int]zD[D])rrA)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 thisr)rErFrrrr@�szNTestClassGetitem.test_class_getitem_inheritance_2.<locals>.C.__class_getitem__N)rrrr@rrrrr�src@seZdZdd�ZdS)z<TestClassGetitem.test_class_getitem_inheritance_2.<locals>.DcSs|j�d|j�d�S)NrHrD)r)rErFrrrr@�szNTestClassGetitem.test_class_getitem_inheritance_2.<locals>.D.__class_getitem__N)rrrr@rrrrr�srzD[int]zD[D])rrA)rrrrrr� 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�S)NrHrD)r)rErFrrrr@�szLTestClassGetitem.test_class_getitem_classmethod.<locals>.C.__class_getitem__N)rrr�classmethodr@rrrrr�src@seZdZdS)z:TestClassGetitem.test_class_getitem_classmethod.<locals>.DN)rrrrrrrr�srzD[int]zD[D])rrA)rrrrrr�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�S)NrHrD)r)rErFrrrr@�szcTestClassGetitem.test_class_getitem_patched.<locals>.C.__init_subclass__.<locals>.__class_getitem__)rKr@)rEr@rrr�__init_subclass__�szHTestClassGetitem.test_class_getitem_patched.<locals>.C.__init_subclass__N)rrrrMrrrrr�src@seZdZdS)z6TestClassGetitem.test_class_getitem_patched.<locals>.DN)rrrrrrrr�srzD[int]zD[D])rrA)rrrrrr�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
||_dS)N)�called_with)rErFrrrr@�szNTestClassGetitem.test_class_getitem_with_builtins.<locals>.A.__class_getitem__)rrrrOr@rrrrr�src@seZdZdS)z<TestClassGetitem.test_class_getitem_with_builtins.<locals>.BN)rrrrrrrr	�sr	)r#�assertIsrOrA)rrr	rrr� test_class_getitem_with_builtins�s
z1TestClassGetitem.test_class_getitem_with_builtinsc	Cs\Gdd�d�}|�t��|tWdQRXGdd�d�}|�t��|tWdQRXdS)Nc@seZdZdd�ZdS)z=TestClassGetitem.test_class_getitem_errors.<locals>.C_too_fewcSsdS)Nr)rErrrr@�szOTestClassGetitem.test_class_getitem_errors.<locals>.C_too_few.__class_getitem__N)rrrr@rrrrr(�sr(c@seZdZdd�ZdS)z>TestClassGetitem.test_class_getitem_errors.<locals>.C_too_manycSsdS)Nr)rEZoneZtworrrr@�szPTestClassGetitem.test_class_getitem_errors.<locals>.C_too_many.__class_getitem__N)rrrr@rrrrr'�sr')r)r*rA)rr(r'rrr�test_class_getitem_errors�sz*TestClassGetitem.test_class_getitem_errorsc	Cs�Gdd�d�}|�t��|�tWdQRXGdd�d�}|�}dd�|_|�t��|tWdQRXGdd�d�}|�t��|tWdQRXdS)	Nc@seZdZdd�ZdS)z7TestClassGetitem.test_class_getitem_errors_2.<locals>.CcSsdS)Nr)rErFrrrr@�szITestClassGetitem.test_class_getitem_errors_2.<locals>.C.__class_getitem__N)rrrr@rrrrr�src@seZdZdS)z7TestClassGetitem.test_class_getitem_errors_2.<locals>.EN)rrrrrrrr�srcSsdS)NzThis will not workr)rErFrrr�<lambda>��z>TestClassGetitem.test_class_getitem_errors_2.<locals>.<lambda>c@seZdZdZdS)zDTestClassGetitem.test_class_getitem_errors_2.<locals>.C_not_callablez	Surprise!N)rrrr@rrrrr,�sr,)r)r*rAr@)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�S)NrHrD)r)rErFrrrr@�szMTestClassGetitem.test_class_getitem_metaclass.<locals>.Meta.__class_getitem__N)rrrr@rrrrr6�sr6z	Meta[int])r;rrA)rr6rrr�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>.MetaN)rrrrrrrr6�sr6c@seZdZdd�ZdS)z=TestClassGetitem.test_class_getitem_with_metaclass.<locals>.CcSs|j�d|j�d�S)NrHrD)r)rErFrrrr@�szOTestClassGetitem.test_class_getitem_with_metaclass.<locals>.C.__class_getitem__N)rrrr@rrrrr�sr)r8zC[int])r;rrA)rr6rrrr�!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)Nzfrom metaclassr)rErFrrr�__getitem__szMTestClassGetitem.test_class_getitem_metaclass_first.<locals>.Meta.__getitem__N)rrrrYrrrrr6sr6c@seZdZdd�ZdS)z>TestClassGetitem.test_class_getitem_metaclass_first.<locals>.CcSsdS)Nzfrom __class_getitem__r)rErFrrrr@szPTestClassGetitem.test_class_getitem_metaclass_first.<locals>.C.__class_getitem__N)rrrr@rrrrrsr)r8zfrom metaclass)r;rrA)rr6rrrr�"test_class_getitem_metaclass_firstsz3TestClassGetitem.test_class_getitem_metaclass_firstN)rrrrCrGrIrJrLrNrQrRrVrWrXrZrrrrr>�s

	
r>c@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>.CN)rrrrrrrrsr)Z	_testcapir\r]ZassertIsInstancer@rArPr;rrrrrr)rr\r]Z
IntGenericrrrr�test_c_classszCAPITest.test_c_classN)rrrr^rrrrr[sr[�__main__)
ZunittestZtestrZTestCaserr>Zcpython_onlyr[r�mainrrrr�<module>sv