Sindbad~EG File Manager

Current Path : /proc/2568807/root/usr/local/lib/python3.12/test/__pycache__/
Upload File :
Current File : //proc/2568807/root/usr/local/lib/python3.12/test/__pycache__/test_genericclass.cpython-312.pyc

�

'Μg�%����ddlZddlmZGd�dej�ZGd�dej�ZejGd�dej��Zed	k(rej�yy)
�N)�supportc�B�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zy
)�TestMROEntryc�����g�Gd�d�}G��fd�d����}|j�g�Gd�d||�}|j�d||ff�|j�di�y)	Nc��eZdZy)�0TestMROEntry.test_mro_entry_signature.<locals>.BN��__name__�
__module__�__qualname__���3/usr/local/lib/python3.12/test/test_genericclass.py�Br��rrc���eZdZ��fd�Zy)�0TestMROEntry.test_mro_entry_signature.<locals>.Cc�0���j||g��fS�N��extend)�self�args�kwargs�C�testeds   ��r�__mro_entries__z@TestMROEntry.test_mro_entry_signature.<locals>.C.__mro_entries__
s����
�
�t�V�n�-��t�rN�r
rrr�rrs��rrr	����
rrc��eZdZy)�0TestMROEntry.test_mro_entry_signature.<locals>.DNr	r
rr�Dr"rrr#r�)�assertEqual)rr�cr#rrs    @@r�test_mro_entry_signaturez%TestMROEntry.test_mro_entry_signaturesh�������	�	�
�C�������$���1��������a��V�I�.�������B�'rc���g�Gd�d�}Gd�d�}G�fd�d�}|�}|j�g�Gd�d|||�}|j�d	|||f�|j|j|||f�|j|j|||f�|j|j||||tf�|�}Gd
�d|�}|j�d	|f�|j|j|f�y)Nc��eZdZy)�&TestMROEntry.test_mro_entry.<locals>.ANr	r
rr�Ar*rrr+c��eZdZy)�&TestMROEntry.test_mro_entry.<locals>.BNr	r
rrrr-rrrc���eZdZ�fd�Zy)�&TestMROEntry.test_mro_entry.<locals>.Cc�@���j|�|jfSr)�append�	__class__�r�basesrs  �rrz6TestMROEntry.test_mro_entry.<locals>.C.__mro_entries__s����
�
�e�$����(�(rNr�rs�rrr/s���
)rrc��eZdZy)�&TestMROEntry.test_mro_entry.<locals>.DNr	r
rrr#r7rrr#���c��eZdZy)�&TestMROEntry.test_mro_entry.<locals>.ENr	r
rr�Er:#rrr;�r%�	__bases__�__orig_bases__�__mro__�object)	rr+rrr&r#�dr;rs	        @r�test_mro_entryzTestMROEntry.test_mro_entrys����������	)�	)�
�C�������$���1�a��������a��A�Y�/�������q�!�Q�i�0�����)�)�A�q�!�9�5�������Q��1�a��$8�9�
�C�����������a�T�*�������q�d�+rc���g�Gd�d�}Gd�d�}G�fd�d�}|�}|j�g�Gd�d|||�}|j�d	|||f�|j|j||f�|j|j|||f�|j|j|||tf�Gd
�d|�}|j�d	|f�|j|jtf�|j|j|f�|j|j|tf�y)Nc��eZdZy)�+TestMROEntry.test_mro_entry_none.<locals>.ANr	r
rrr+rE)rrr+c��eZdZy)�+TestMROEntry.test_mro_entry_none.<locals>.BNr	r
rrrrG*rrrc���eZdZ�fd�Zy)�+TestMROEntry.test_mro_entry_none.<locals>.Cc�(���j|�y�Nr
�r1r3s  �rrz;TestMROEntry.test_mro_entry_none.<locals>.C.__mro_entries__,s����
�
�e�$�rNrr5s�rrrI+s���
rrc��eZdZy)�+TestMROEntry.test_mro_entry_none.<locals>.DNr	r
rrr#rN1rrr#r8c��eZdZy)�+TestMROEntry.test_mro_entry_none.<locals>.ENr	r
rrr;rP6rrr;r<)rr+rrr&r#r;rs       @r�test_mro_entry_nonez TestMROEntry.test_mro_entry_none's���������	�	�
�C�������$���1�a��������a��A�Y�/�������q�!�f�-�����)�)�A�q�!�9�5�������Q��1�f�$5�6����������a�T�*�������v�i�0�����)�)�A�4�0�������Q��K�0rc�~��g�Gd�d�}G�fd�d�}|�}|j�g�Gd�d||�}|j�d||f�|j|j|tf�|j|j||f�|j|j||tt
f�y)Nc��eZdZy)�4TestMROEntry.test_mro_entry_with_builtins.<locals>.ANr	r
rrr+rT>rrr+c���eZdZ�fd�Zy)�4TestMROEntry.test_mro_entry_with_builtins.<locals>.Cc�4���j|�tfSr)r1�dictr3s  �rrzDTestMROEntry.test_mro_entry_with_builtins.<locals>.C.__mro_entries__@s����
�
�e�$��w�rNrr5s�rrrV?s���
rrc��eZdZy)�4TestMROEntry.test_mro_entry_with_builtins.<locals>.DNr	r
rrr#rZErrr#r8)r%r=rXr>r?r@)rr+rr&r#rs     @r�test_mro_entry_with_builtinsz)TestMROEntry.test_mro_entry_with_builtins<s��������	�	�
�C�������$���1��������a��V�,�������q�$�i�0�����)�)�A�q�6�2�������Q��4��$8�9rc����g�G��fd�d����}|j�g�Gd�d|t�}|j�d|tf�|j|j�tf�|j|j|tf�|j|j|�tt
f�y)Nc���eZdZ��fd�Zy)�6TestMROEntry.test_mro_entry_with_builtins_2.<locals>.Cc�,���j|��fSrrL)rr4rrs  ��rrzFTestMROEntry.test_mro_entry_with_builtins_2.<locals>.C.__mro_entries__Ns����
�
�e�$��t�rNrrs��rrr^Mr rrc��eZdZy)�6TestMROEntry.test_mro_entry_with_builtins_2.<locals>.DNr	r
rrr#raSrrr#r8)r%rXr=r>r?r@)rr&r#rrs   @@r�test_mro_entry_with_builtins_2z+TestMROEntry.test_mro_entry_with_builtins_2Ks������	�	�
�C�������$���4��������a��Y�/�������q�$�i�0�����)�)�A�t�9�5�������Q��4��$8�9rc��Gd�d�}|�}|jt�5Gd�d|�}ddd�Gd�d�}|�}|jt�5Gd�d|�}ddd�y#1swY�DxYw#1swYyxYw)	Nc��eZdZd�Zy)�6TestMROEntry.test_mro_entry_errors.<locals>.C_too_manyc��yrKr
)rr4�	something�others    rrzFTestMROEntry.test_mro_entry_errors.<locals>.C_too_many.__mro_entries__[���rNrr
rr�
C_too_manyreZ���
rrjc��eZdZy)�-TestMROEntry.test_mro_entry_errors.<locals>.DNr	r
rrr#rm_rrr#c��eZdZd�Zy)�5TestMROEntry.test_mro_entry_errors.<locals>.C_too_fewc��yrKr
�rs rrzETestMROEntry.test_mro_entry_errors.<locals>.C_too_few.__mro_entries__arirNrr
rr�	C_too_fewro`rkrrrc��eZdZy)�-TestMROEntry.test_mro_entry_errors.<locals>.ENr	r
rrr;rterrr;��assertRaises�	TypeError)rrjr&r#rrrAr;s       r�test_mro_entry_errorsz"TestMROEntry.test_mro_entry_errorsYsq��	�	�
�L��
�
�
�y�
)��A�O�*�	�	�
�K��
�
�
�y�
)��A�O�*�
)�
*�
)��*�
)���A6�!B�6A?�Bc��Gd�d�}|�}|jt�5Gd�d|�}ddd�Gd�d�}|�}|jt�5Gd�d|�}ddd�y#1swY�DxYw#1swYyxYw)	Nc��eZdZdZy)�<TestMROEntry.test_mro_entry_errors_2.<locals>.C_not_callable�	Surprise!Nrr
rr�C_not_callabler|hs��)�Orr~c��eZdZy)�/TestMROEntry.test_mro_entry_errors_2.<locals>.DNr	r
rrr#r�lrrr#c��eZdZd�Zy)�9TestMROEntry.test_mro_entry_errors_2.<locals>.C_not_tuplec��tSr)r@rqs rrzITestMROEntry.test_mro_entry_errors_2.<locals>.C_not_tuple.__mro_entries__ns���
rNrr
rr�C_not_tupler�ms��
rr�c��eZdZy)�/TestMROEntry.test_mro_entry_errors_2.<locals>.ENr	r
rrr;r�rrrr;ru)rr~r&r#r�r;s      r�test_mro_entry_errors_2z$TestMROEntry.test_mro_entry_errors_2gsp��	*�	*����
�
�
�y�
)��A�O�*�	�	�
�M��
�
�
�y�
)��A�O�*�
)�
*�
)��*�
)�ryc�$���g�G�fd�dt�}Gd�d��G�fd�d�}|�}Gd�d||�	�}|j�d
|�|j�dd�|j�d�f�|j�d
dd�|j|j�f�|j|j|f�|j|j|�t
f�|j|j|�y)Nc�"���eZdZ��fd�Z�xZS)�3TestMROEntry.test_mro_entry_metaclass.<locals>.Metac�R���j||||g�t�|�	||||�Sr)r�super�__new__)�mcls�namer4�nsr2�	meta_argss    ��rr�z;TestMROEntry.test_mro_entry_metaclass.<locals>.Meta.__new__ws/���� � �$��e�R�!8�9��w��t�T�5�"�=�=r)r
rrr��
__classcell__)r2r�s@�r�Metar�vs
���
>�
>rr�c��eZdZy)�0TestMROEntry.test_mro_entry_metaclass.<locals>.ANr	r
rrr+r�zrrr+c���eZdZ�fd�Zy)�0TestMROEntry.test_mro_entry_metaclass.<locals>.Cc�
���fSrr
)rr4r+s  �rrz@TestMROEntry.test_mro_entry_metaclass.<locals>.C.__mro_entries__|s
����t�rNr)r+s�rrr�{s���
rrc��eZdZdZy)�0TestMROEntry.test_mro_entry_metaclass.<locals>.Dr$N)r
rr�xr
rrr#r�s���Arr#��	metaclassrr$��r�)�typer%r=r>r?r@r2)rr�rr&r#r+r�s     @@r�test_mro_entry_metaclassz%TestMROEntry.test_mro_entry_metaclassts�����	�	>�4�	>�	��	�	�
�C��	��T�	�����1��t�,�����1��s�+�����1���t�,�����1��c�*�A�.�������q�d�+�����)�)�A�4�0�������Q��6�N�3�������d�+rc��Gd�d�}|�}|jtd�5td|fi�ddd�y#1swYyxYw)Nc��eZdZd�Zy)�0TestMROEntry.test_mro_entry_type_call.<locals>.Cc��yrKr
)rr4s  rrz@TestMROEntry.test_mro_entry_type_call.<locals>.C.__mro_entries__�rirNrr
rrrr��rkrrz+MRO entry resolution; use types.new_class()�Bad)�assertRaisesRegexrwr�)rrr&s   r�test_mro_entry_type_callz%TestMROEntry.test_mro_entry_type_call�sJ��	�	�
�C��
�
#�
#�I�%<�=�
����b�!�=�=�=�s�A�A	N)r
rrr'rBrQr[rbrxr�r�r�r
rrrrs/��(�,�(1�*
:�:���,�,	"rrc�T�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zy
)�TestClassGetitemc���g�G�fd�d�}|ttf|j�d|ttff�|j�di�y)Nc���eZdZ�fd�Zy)�.TestClassGetitem.test_class_getitem.<locals>.Cc�,���j||g�yrr)rr�getitem_argss  �r�__class_getitem__z@TestClassGetitem.test_class_getitem.<locals>.C.__class_getitem__�s����#�#�T�6�N�3�rN�r
rrr�)r�s�rrr��s���
rrrr$)�int�strr%)rrr�s  @r�test_class_getitemz#TestClassGetitem.test_class_getitem�sO�����	�	�	
�#�s�(������a��1�s�C�j�/�:�����a��"�-rc�t�Gd�d�}|j|td�|j||d�y)Nc��eZdZd�Zy)�5TestClassGetitem.test_class_getitem_format.<locals>.Cc�"�d|j�d�S)NzC[�]�r
��cls�items  rr�zGTestClassGetitem.test_class_getitem_format.<locals>.C.__class_getitem__�s���D�M�M�?�!�,�,rNr�r
rrrr�����
-rr�C[int]zC[C]�r%r�)rrs  r�test_class_getitem_formatz*TestClassGetitem.test_class_getitem_format�s6��	-�	-�	
����3���*�����1��v�&rc��Gd�d�}Gd�d|�}|j|td�|j||d�y)Nc��eZdZd�Zy)�:TestClassGetitem.test_class_getitem_inheritance.<locals>.Cc�:�|j�d|j�d�S�N�[r�r�r�s  rr�zLTestClassGetitem.test_class_getitem_inheritance.<locals>.C.__class_getitem__�����,�,��q�����q�9�9rNr�r
rrrr�����
:rrc��eZdZy)�:TestClassGetitem.test_class_getitem_inheritance.<locals>.DNr	r
rrr#r��rrr#�D[int]�D[D]r��rrr#s   r�test_class_getitem_inheritancez/TestClassGetitem.test_class_getitem_inheritance�s=��	:�	:�	�������3���*�����1��v�&rc��Gd�d�}Gd�d|�}|j|td�|j||d�y)Nc��eZdZd�Zy)�<TestClassGetitem.test_class_getitem_inheritance_2.<locals>.Cc��y)NzShould not see thisr
r�s  rr�zNTestClassGetitem.test_class_getitem_inheritance_2.<locals>.C.__class_getitem__�s��,rNr�r
rrrr��r�rrc��eZdZd�Zy)�<TestClassGetitem.test_class_getitem_inheritance_2.<locals>.Dc�:�|j�d|j�d�Sr�r�r�s  rr�zNTestClassGetitem.test_class_getitem_inheritance_2.<locals>.D.__class_getitem__�r�rNr�r
rrr#r��r�rr#r�r�r�r�s   r� test_class_getitem_inheritance_2z1TestClassGetitem.test_class_getitem_inheritance_2�sB��	-�	-�	:��	:�	
����3���*�����1��v�&rc��Gd�d�}Gd�d|�}|j|td�|j||d�y)Nc��eZdZed��Zy)�:TestClassGetitem.test_class_getitem_classmethod.<locals>.Cc�:�|j�d|j�d�Sr�r�r�s  rr�zLTestClassGetitem.test_class_getitem_classmethod.<locals>.C.__class_getitem__�s���,�,��q�����q�9�9rN)r
rr�classmethodr�r
rrrr��s��
�
:��
:rrc��eZdZy)�:TestClassGetitem.test_class_getitem_classmethod.<locals>.DNr	r
rrr#r��rrr#r�r�r�r�s   r�test_class_getitem_classmethodz/TestClassGetitem.test_class_getitem_classmethod�s=��	:�	:�	�������3���*�����1��v�&rc��Gd�d�}Gd�d|�}|j|td�|j||d�y)Nc��eZdZd�Zy)�6TestClassGetitem.test_class_getitem_patched.<locals>.Cc�*�d�}t|�|_y)Nc�:�|j�d|j�d�Sr�r�r�s  rr�zcTestClassGetitem.test_class_getitem_patched.<locals>.C.__init_subclass__.<locals>.__class_getitem__�s��!�l�l�^�1�T�]�]�O�1�=�=r)r�r�)r�r�s  r�__init_subclass__zHTestClassGetitem.test_class_getitem_patched.<locals>.C.__init_subclass__�s��>�(3�4E�(F��%rN)r
rrr�r
rrrr��s��
Grrc��eZdZy)�6TestClassGetitem.test_class_getitem_patched.<locals>.DNr	r
rrr#r��rrr#r�r�r�r�s   r�test_class_getitem_patchedz+TestClassGetitem.test_class_getitem_patched�s?��	G�	G�
	�������3���*�����1��v�&rc���Gd�dt�}Gd�d|�}|j|jd�|t|j|jt�y)Nc��eZdZdZd�Zy)�<TestClassGetitem.test_class_getitem_with_builtins.<locals>.ANc��||_yr)�called_withr�s  rr�zNTestClassGetitem.test_class_getitem_with_builtins.<locals>.A.__class_getitem__�s	��"&��r)r
rrr�r�r
rrr+r��s���K�
'rr+c��eZdZy)�<TestClassGetitem.test_class_getitem_with_builtins.<locals>.BNr	r
rrrr�����rr)rX�assertIsr�r�)rr+rs   r� test_class_getitem_with_builtinsz1TestClassGetitem.test_class_getitem_with_builtins�sE��	'��	'�
	��	��
�
�a�m�m�T�*�	�#���
�
�a�m�m�S�)rc��Gd�d�}|jt�5|tddd�Gd�d�}|jt�5|tddd�y#1swY�;xYw#1swYyxYw)Nc��eZdZd�Zy)�=TestClassGetitem.test_class_getitem_errors.<locals>.C_too_fewc��yrr
)r�s rr�zOTestClassGetitem.test_class_getitem_errors.<locals>.C_too_few.__class_getitem__����rNr�r
rrrrr�����
rrrc��eZdZd�Zy)�>TestClassGetitem.test_class_getitem_errors.<locals>.C_too_manyc��yrr
)r��one�twos   rr�zPTestClassGetitem.test_class_getitem_errors.<locals>.C_too_many.__class_getitem__�r�rNr�r
rrrjr��r�rrj)rvrwr�)rrrrjs   r�test_class_getitem_errorsz*TestClassGetitem.test_class_getitem_errors�sc��	�	��
�
�y�
)��c�N�*�	�	��
�
�y�
)��s�O�*�
)�
*�
)��*�
)�s�
A$�
A0�$A-�0A9c� �Gd�d�}|jt�5|�tddd�Gd�d�}|�}d�|_|jt�5|tddd�Gd�d�}|jt�5|tddd�Gd�d	t�}|jtd	�5|tddd�y#1swY��xYw#1swY�~xYw#1swY�YxYw#1swYyxYw)
Nc��eZdZd�Zy)�7TestClassGetitem.test_class_getitem_errors_2.<locals>.Cc��yrr
r�s  rr�zITestClassGetitem.test_class_getitem_errors_2.<locals>.C.__class_getitem__�r�rNr�r
rrrr�r�rrc��eZdZy)�7TestClassGetitem.test_class_getitem_errors_2.<locals>.ENr	r
rrr;r�rrr;c��y)NzThis will not workr
r�s  r�<lambda>z>TestClassGetitem.test_class_getitem_errors_2.<locals>.<lambda>�s��0Drc��eZdZdZy)�DTestClassGetitem.test_class_getitem_errors_2.<locals>.C_not_callabler}Nr�r
rrr~r�s�� +�rr~c��eZdZdZy)�?TestClassGetitem.test_class_getitem_errors_2.<locals>.C_is_noneNr�r
rr�	C_is_noner
�s�� $�rr)rvrwr�r��tupler�)rrr;�er~rs      r�test_class_getitem_errors_2z,TestClassGetitem.test_class_getitem_errors_2�s���	�	��
�
�y�
)�
�C��H�*�	��
�C��D���
�
�
�y�
)�
�c�F�*�	,�	,�
�
�
�y�
)��3��*�	%��	%�
�
#�
#�I�{�
;��c�N�<�
;�!*�
)��*�
)��
*�
)��
<�
;�s/�C �%
C,�
C8�
D� C)�,C5�8D�D
c�T�Gd�dt�}|j|td�y)Nc��eZdZd�Zy)�;TestClassGetitem.test_class_getitem_metaclass.<locals>.Metac�:�|j�d|j�d�Sr�r�r�s  rr�zMTestClassGetitem.test_class_getitem_metaclass.<locals>.Meta.__class_getitem__�r�rNr�r
rrr�r�r�rr�z	Meta[int]�r�r%r�)rr�s  r�test_class_getitem_metaclassz-TestClassGetitem.test_class_getitem_metaclass�s$��	:�4�	:�	
����c��K�0rc�l�Gd�dt�}Gd�d|��}|j|td�y)Nc��eZdZy)�@TestClassGetitem.test_class_getitem_with_metaclass.<locals>.MetaNr	r
rrr�rrrr�c��eZdZd�Zy)�=TestClassGetitem.test_class_getitem_with_metaclass.<locals>.Cc�:�|j�d|j�d�Sr�r�r�s  rr�zOTestClassGetitem.test_class_getitem_with_metaclass.<locals>.C.__class_getitem__r�rNr�r
rrrrr�rrr�r�r�rr�rs   r�!test_class_getitem_with_metaclassz2TestClassGetitem.test_class_getitem_with_metaclasss,���4��	:�$�	:�	
����3���*rc�l�Gd�dt�}Gd�d|��}|j|td�y)Nc��eZdZd�Zy)�ATestClassGetitem.test_class_getitem_metaclass_first.<locals>.Metac��y)N�from metaclassr
r�s  r�__getitem__zMTestClassGetitem.test_class_getitem_metaclass_first.<locals>.Meta.__getitem__s��'rN)r
rrr"r
rrr�rs��
(rr�c��eZdZd�Zy)�>TestClassGetitem.test_class_getitem_metaclass_first.<locals>.Cc��y)Nzfrom __class_getitem__r
r�s  rr�zPTestClassGetitem.test_class_getitem_metaclass_first.<locals>.C.__class_getitem__s��/rNr�r
rrrr$s��
0rrr�r!rrs   r�"test_class_getitem_metaclass_firstz3TestClassGetitem.test_class_getitem_metaclass_first
s1��	(�4�	(�	0�$�	0�	
����3��!1�2rN)r
rrr�r�r�r�r�r�r�r�rrrr&r
rrr�r��s>��.�'�'�'�'�'�
*���.1�+�3rr�c��eZdZd�Zy)�CAPITestc���ddlm}m}|j|j	t
�|�|t
}|j
t|�|�|j|jd�t
f�Gd�d|�}|j|jt
f�|j|j|f�|j|j|t
tf�y)Nr)�Generic�GenericAliasr
c��eZdZy)� CAPITest.test_c_class.<locals>.CNr	r
rrrr-r�rr)�	_testcapir*r+�assertIsInstancer�r�r�r�r%rr=r>r?r@)rr*r+�
IntGenericrs     r�test_c_classzCAPITest.test_c_classs���3����g�7�7��<�l�K��S�\�
��
�
�d�:�&��5�����3�3�B�7�#��@�	�
�	�������s�f�-�����)�)�J�=�9�������Q��V�$4�5rN)r
rrr1r
rrr(r(s��6rr(�__main__)
�unittest�testr�TestCaserr��cpython_onlyr(r
�mainr
rr�<module>r8sv����N"�8�$�$�N"�b{3�x�(�(�{3�|	���
6�x� � �
6��
6� �z���H�M�M�O�r

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