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_list.cpython-312.opt-2.pyc

�

'Μge&���ddlZddlmZddlmZddlZddlZGd�dej�Ze	dk(rej�yy)�N)�
list_tests)�cpython_onlyc���eZdZeZd�Zd�Zd�Z�fd�Zd�Z	�fd�Z
d�Zd�Zd	�Z
d
�Zd�Zd�Zd
�Zd�Zd�Zd�Zed��Zd�Z�xZS)�ListTestc���|jtg�g�gd�}t|�}|j||�|j||u�|jtd�g�|jtd�gd��|jtd�g�|jtd�gd��|jtd�td�D��gd��tj
d	k(r5|j
ttttj
d
z��g}|jd�|D��|j|g�y)N)r������spam)�s�p�a�mc3�,K�|]}|dzs�	|���y�w)r	Nr)�.0�xs  �+/usr/local/lib/python3.12/test/test_list.py�	<genexpr>z&ListTest.test_basic.<locals>.<genexpr>s����<��A�a�!�e�a��s�
��
)rr
���	i���r	c3�"K�|]}|���	y�w�Nr)r�ys  rrz&ListTest.test_basic.<locals>.<genexpr>*s�����Q��!��Q�s�
)	�assertEqual�list�
assertTrue�range�sys�maxsize�assertRaises�MemoryError�extend)�self�l0_3�l0_3_bisrs    r�
test_basiczListTest.test_basic
s������b��2�&�����:������x�(�����H�,�-�����b��2�&�����l�+�\�:�����b��2�&�����f��';�<�����<��r��<�<�(�	*��;�;�*�$�
���k�4��s�{�{�a�7G�1H�I�
��	����Q�������B��c�r�|jtd�5tg��ddd�y#1swYyxYw)Nzkeyword argument��sequence)�assertRaisesRegex�	TypeErrorr�r's r�test_keyword_argszListTest.test_keyword_args-s(��
�
#�
#�I�/A�
B��"��C�
B�
B�s�
-�6c���Gd�dt�}|ddg�}|jt|�|�|jt|�ddg�|j	t
�5|d��ddd�Gd�dt�}|ddgd	�
�}|jt|�|�|jt|�ddg�|j|jd	�Gd�dt�}|ddgd	�
�}|jt|�|�|jt|�ddg�|j|jd	�y#1swY��xYw)
Nc��eZdZy)�4ListTest.test_keywords_in_subclass.<locals>.subclassN��__name__�
__module__�__qualname__rr+r�subclassr52s��r+r:rr	rr-c� ��eZdZd�fd�	Z�xZS)�>ListTest.test_keywords_in_subclass.<locals>.subclass_with_initc�2��t�|�|�||_yr)�super�__init__�newarg)r'�seqr@�	__class__s   �rr?zGListTest.test_keywords_in_subclass.<locals>.subclass_with_init.__init__;s����� ��%�$��r+r)r7r8r9r?�
__classcell__�rBs@r�subclass_with_initr<:s
���
%�
%r+rEr
)r@c� ��eZdZd�fd�	Z�xZS)�=ListTest.test_keywords_in_subclass.<locals>.subclass_with_newc�6��t�|�||�}||_|Sr)r>�__new__r@)�clsrAr@r'rBs    �rrIzEListTest.test_keywords_in_subclass.<locals>.subclass_with_new.__new__Ds����w��s�C�0��$����r+r)r7r8r9rIrCrDs@r�subclass_with_newrGCs
���
�
r+rK)r�assertIs�typerr$r0r@)r'r:�urErKs     r�test_keywords_in_subclassz"ListTest.test_keywords_in_subclass1s$��	�t�	��a��V����
�
�d�1�g�x�(�����a��1�a�&�)�
�
�
�y�
)��b�!�*�	%��	%�
��1�v�a�0���
�
�d�1�g�1�2�����a��1�a�&�)�������1�%�	��	�

�q�!�f�Q�/���
�
�d�1�g�0�1�����a��1�a�&�)�������1�%�)*�
)�s�'
E�E!c�j��t�|��|jg�|jdg�y)N�*)r>�
test_truthr �r'rBs �rrRzListTest.test_truthMs*���
�������B��������r+c�*�|jggu�yr)r r1s r�
test_identityzListTest.test_identityRs������"��%r+c����t�|��|jtg�d�|jtdg�d�|jtgd��d�y)Nrr)rrr	r
)r>�test_lenr�lenrSs �rrWzListTest.test_lenUsL���
��������R��!�$�����a�S��1�%�����Y���+r+c���gd�}ttjdzdzt|�z�}d�}d�}|j	t
tf|||�|j	t
tf|||�y)N��r�rr	c��||zSrr�r�bs  r�mulz#ListTest.test_overflow.<locals>.mul^s
��a�!�e�|r+c��||z}yrrr^s  r�imulz$ListTest.test_overflow.<locals>.imul_s
���Q��r+)�intr"r#rXr$r%�
OverflowError)r'�lst�nr`rbs     r�
test_overflowzListTest.test_overflow[s^��������Q��q��S��X�-�.��#�����;�
�6��S�!�D����;�
�6��c�1�Er+c�D�dgdz}|dd�=|jt|�d�tj}|j	t
tf�5||zddd�|j	t
tf�5||z}ddd�y#1swY�3xYw#1swYyxYw)Nr�Ar)rrXr"r#r$r%rd)r're�sizes   r�test_list_resize_overflowz"ListTest.test_list_resize_overflowcs����c�B�h�����G�����S��1�%��{�{��
�
�
��]�;�
<��$�J�=�
�
�
��]�;�
<��4�K�C�=�
<�=�
<��
<�
<�s�B
�;B�
B�Bc�0���fd�}|d�|d�y)Nc�~��dg|z}t|�}�j|ddjdg|z�zdz�y)Nr�[z, �0�])�reprr�join)rf�lrr's   �r�checkz'ListTest.test_repr_large.<locals>.checkrsC�����a��A��Q��A����Q��d�i�i����	�*�*�S�0�
2r+ri@Br)r'rts` r�test_repr_largezListTest.test_repr_largeps���	2�
	�b�	�
�g�r+c��|jgd��}gd�}ttjdz�D�]}t	|�}tj
||f|�}tj|�\}}||dd|jt|�t|��|jt|�|�t|�tj
||f|�}tj|�\}}||dd|jt|�t|��|jt|�|dd�tdt|��D]
}t|��tj
||f|�}tj|�\}}||dd|jt|�t|��|jt|�|t|�d�|jtt|�tj
||f|�}tj|�\}}||dd|jt|�g���y)NrZ�r���
��r)�	type2testr!�pickle�HIGHEST_PROTOCOL�iter�dumps�loadsrrMr�nextrXr$�
StopIteration�	r'�orig�data�proto�itorig�d�itr�is	         r�test_iterator_picklezListTest.test_iterator_picklezs����~�~�l�+��'���6�2�2�Q�6�7�E��$�Z�F����f�d�^�U�3�A��L�L��O�E�B���A�a�D����T�"�X�t�F�|�4����T�"�X�t�,�
��L����f�d�^�U�3�A��L�L��O�E�B���A�a�D����T�"�X�t�F�|�4����T�"�X�t�A�B�x�0��1�c�$�i�(���V��)����f�d�^�U�3�A��L�L��O�E�B���A�a�D����T�"�X�t�F�|�4����T�"�X�t�C��I�J�'7�8�
���m�T�6�:����f�d�^�U�3�A��L�L��O�E�B���A�a�D����T�"�X�r�*�?8r+c���|jgd��}gd�}ttjdz�D�])}t	|�}tj
||f|�}tj|�\}}||dd|jt|�t|��|jt|�|t|�dz
dd��t|�tj
||f|�}tj|�\}}||dd|jt|�t|��|jt|�|t|�dz
dd��tdt|��D]
}t|��tj
||f|�}tj|�\}}||dd|jt|�t|��|jt|�g�|jtt|�tj
||f|�}tj|�\}}||dd|jt|�g���,y)NrZrwr���r	)r}r!r~r�reversedr�r�rrMrrXr�r$r�r�s	         r�test_reversed_picklezListTest.test_reversed_pickle�s����~�~�l�+��'���6�2�2�Q�6�7�E��d�^�F����f�d�^�U�3�A��L�L��O�E�B���A�a�D����T�"�X�t�F�|�4����T�"�X�t�C��I�a�K�O��O�'<�=�
��L����f�d�^�U�3�A��L�L��O�E�B���A�a�D����T�"�X�t�F�|�4����T�"�X�t�C��I�a�K�O��O�'<�=��1�c�$�i�(���V��)����f�d�^�U�3�A��L�L��O�E�B���A�a�D����T�"�X�t�F�|�4����T�"�X�r�*�
���m�T�6�:����f�d�^�U�3�A��L�L��O�E�B���A�a�D����T�"�X�r�*�?8r+c��gd�}dg|ddtj�<|j|ddtj�dg�y)N)rrr	r
r[rrr
)r"r#r)r'rs  r�test_step_overflowzListTest.test_step_overflow�s>�����C��!�.�S�[�[�.������1�>�c�k�k�>�*�Q�C�0r+c��Gd�dt�}|jt�5d|ddg�zddd�y#1swYyxYw)Nc��eZdZy)�*ListTest.test_no_comdat_folding.<locals>.LNr6rr+r�Lr��s�r+r�)r
rr	)rr$r0)r'r�s  r�test_no_comdat_foldingzListTest.test_no_comdat_folding�s5��	���
�
�
�y�
)��1�a��U�8�O�*�
)�
)�s	�<�Ac������G�fd�d�}G�fd�d�}G�fd�d�}|�g�|�g�|j��k(�|�g�dg}|j�|k(�y)Nc���eZdZ�fd�Zy)�9ListTest.test_equal_operator_modifying_operand.<locals>.Xc�0���j�tSr��clear�NotImplemented)r'�other�list2s  �r�__eq__z@ListTest.test_equal_operator_modifying_operand.<locals>.X.__eq__��������
�%�%r+N�r7r8r9r�)r�s�r�Xr������
&r+r�c���eZdZ�fd�Zy)�9ListTest.test_equal_operator_modifying_operand.<locals>.Yc�0���j�tSrr�)r'r��list1s  �rr�z@ListTest.test_equal_operator_modifying_operand.<locals>.Y.__eq__�r�r+Nr�)r�s�r�Yr��r�r+r�c���eZdZ�fd�Zy)�9ListTest.test_equal_operator_modifying_operand.<locals>.Zc�0���j�tSrr�)r'r��list3s  �rr�z@ListTest.test_equal_operator_modifying_operand.<locals>.Z.__eq__�r�r+Nr�)r�s�r�Zr��r�r+r�r)r �assertFalse)r'r�r�r��list4r�r�r�s     @@@r�%test_equal_operator_modifying_operandz.ListTest.test_equal_operator_modifying_operand�sg���	&�	&�
	&�	&�
	&�	&�
��������������'������������%��(r+c��Gd�d�}|�gg}|jt�5|d|kddd�y#1swYyxYw)Nc��eZdZd�Zy)�9ListTest.test_lt_operator_modifying_operand.<locals>.evilc�.�|j�tSrr��r'r�s  r�__lt__z@ListTest.test_lt_operator_modifying_operand.<locals>.evil.__lt__�s�����
�%�%r+N)r7r8r9r�rr+r�evilr�����
&r+r�r)r$r0)r'r�rs   r�"test_lt_operator_modifying_operandz+ListTest.test_lt_operator_modifying_operand�s>��	&�	&�
�f�X�J��
�
�
�y�
)�
�a�D�1�H�*�
)�
)�s	�	;�Ac��Gd�d�}ttd��}||�}|jt�5||ddd�<ddd�y#1swYyxYw)Nc��eZdZd�Zd�Zy)�7ListTest.test_list_index_modifing_operand.<locals>.evilc��||_yr�re)r'res  rr?z@ListTest.test_list_index_modifing_operand.<locals>.evil.__init__�s	����r+c3�lK�|jEd{���|jj�y7��wr)rer�r1s r�__iter__z@ListTest.test_list_index_modifing_operand.<locals>.evil.__iter__�s&�����8�8�#�#������ �$�s�4�2� 4N)r7r8r9r?r�rr+rr�r��s��
�
!r+r�rr�)rr!r$�
ValueError)r'r�re�operands    r� test_list_index_modifing_operandz)ListTest.test_list_index_modifing_operand�sK��	!�	!��5��8�n���s�)��
�
�
�z�
*��C��"��I�+�
*�
*�s�	A�Ac
��dgdz}tj|�}|j|tjtdgdz���|j|tjtt	d����y)Nrr)r"�	getsizeofrrr!)r'�iterable�	iter_sizes   r�test_preallocationzListTest.test_preallocations_���3��8���M�M�(�+�	�����C�M�M�$��s�R�x�.�$A�B�����C�M�M�$�u�R�y�/�$B�Cr+c����G�fd�d�}|�g�|jt�5�j��ddd�Gd�dt�}||�g���j	��||�g��|jt�5�j��ddd�|�|�g�d�v|�|�g�|��vy#1swY��xYw#1swY�?xYw)Nc���eZdZ�fd�Zy)�3ListTest.test_count_index_remove_crashes.<locals>.Xc�0���j�tSrr�)r'r�res  �rr�z:ListTest.test_count_index_remove_crashes.<locals>.X.__eq__s����	�	��%�%r+Nr�r�s�rr�r�
r�r+r�c��eZdZd�Zy)�3ListTest.test_count_index_remove_crashes.<locals>.Lc�$�t|�tSr)�strr�r�s  rr�z:ListTest.test_count_index_remove_crashes.<locals>.L.__eq__s���E�
�%�%r+Nr�rr+rr�r�r�r+r�r
)r$r��indexr�count�remove)r'r�r�res   @r�test_count_index_remove_crashesz(ListTest.test_count_index_remove_crashes	s����	&�	&�
�s�e��
�
�
�z�
*��I�I�c�N�+�	&��	&�
����h���	�	�#������h��
�
�
�z�
*��J�J�s�O�+�
�s�A�C�j��	�S���s�A�C�j��	��s�
�)+�
*��+�
*�s�C�C&�C#�&C/)r7r8r9rr}r*r2rOrRrUrWrgrkrur�r�r�r�r�r�r�rr�r�rCrDs@rrrsw����I�! �F�&�8�
&�,�F���"+�H"+�H1�
�)�2	� ��D��D�r+r�__main__)r"�testr�test.supportrr~�unittest�
CommonTestrr7�mainrr+r�<module>r�sC��
��%�
��`�z�$�$�`�F	�z���H�M�M�O�r+

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