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

�i��@sZddlZddlmZddlmZddlZddlZGdd�dej�Ze	dkr+e�
�dSdS)�N)�
list_tests)�cpython_onlycs�eZdZeZdd�Zdd�Z�fdd�Zdd�Z�fd	d
�Z	dd�Z
d
d�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zedd��Zdd�Z�ZS)�ListTestcCs�|�tg�g�gd�}t|�}|�||�|�||u�|�td�g�|�td�gd��|�td�g�|�td�gd��|�tdd�td�D��gd	��tjd
krc|�ttttjd��g}|�dd�|D��|�|g�dS)
N)r�����Zspam)�s�p�a�mcss�|]	}|dr|VqdS)rNr)�.0�xrr�+/usr/local/lib/python3.10/test/test_list.py�	<genexpr>s�z&ListTest.test_basic.<locals>.<genexpr>�
)rr���	i���rcss�|]}|VqdS�Nr)r�yrrrr*s�)	�assertEqual�list�
assertTrue�range�sys�maxsize�assertRaises�MemoryError�extend)�selfZl0_3Zl0_3_bisrrrr�
test_basic
s"�
zListTest.test_basiccCs<|�td��tgd�Wd�dS1swYdS)Nzkeyword argument)Zsequence)ZassertRaisesRegex�	TypeErrorr�r!rrr�test_keyword_args-s"�zListTest.test_keyword_argscs&t���|�g�|�dg�dS)N�*)�super�
test_truthrr$��	__class__rrr(1s
zListTest.test_truthcCs|�ggu�dSr)rr$rrr�
test_identity6szListTest.test_identitycsDt���|�tg�d�|�tdg�d�|�tgd��d�dS)Nrr)rrrr)r'�test_lenr�lenr$r)rrr,9s
zListTest.test_lencCs^gd�}ttjddt|��}dd�}dd�}|�ttf|||�|�ttf|||�dS)N��r�rrcSs||Srr�r�brrr�mulBsz#ListTest.test_overflow.<locals>.mulcSs||9}dSrrr1rrr�imulC�z$ListTest.test_overflow.<locals>.imul)�intrrr-rr�
OverflowError)r!�lst�nr3r4rrr�
test_overflow?szListTest.test_overflowcCs�dgd}|dd�=|�t|�d�dtjddd}|�ttf��||Wd�n1s3wY|�ttf��
||9}Wd�dS1sOwYdS)Nr�Arr�)rr-�tuple�__itemsize__rrr7)r!r8�sizerrr�test_list_resize_overflowGs


�
"�z"ListTest.test_list_resize_overflowcs �fdd�}|d�|d�dS)Ncs6dg|}t|�}��|dd�dg|�d�dS)Nr�[z, �0�])�reprr�join)r9�lr
r$rr�checkVs

�z'ListTest.test_repr_large.<locals>.checkri@Br)r!rGrr$r�test_repr_largeTszListTest.test_repr_largec	Cs�|�gd��}gd�}ttjd�D]�}t|�}t�||f|�}t�|�\}}||dd�<|�t|�t|��|�t	|�|�t
|�t�||f|�}t�|�\}}||dd�<|�t|�t|��|�t	|�|dd��tdt|��D]}t
|�qut�||f|�}t�|�\}}||dd�<|�t|�t|��|�t	|�|t|�d��|�t
t
|�t�||f|�}t�|�\}}||dd�<|�t	|�g�qdS)Nr.�r���
��r)�	type2testr�pickle�HIGHEST_PROTOCOL�iter�dumps�loadsr�typer�nextr-r�
StopIteration�	r!Zorig�data�protoZitorig�d�itr�irrr�test_iterator_pickle^s8
�zListTest.test_iterator_picklec	Cs�|�gd��}gd�}ttjd�D]�}t|�}t�||f|�}t�|�\}}||dd�<|�t|�t|��|�t	|�|t
|�ddd��t|�t�||f|�}t�|�\}}||dd�<|�t|�t|��|�t	|�|t
|�ddd��tdt
|��D]}t|�q�t�||f|�}t�|�\}}||dd�<|�t|�t|��|�t	|�g�|�t
t|�t�||f|�}t�|�\}}||dd�<|�t	|�g�qdS)Nr.rIr���r)rOrrPrQ�reversedrSrTrrUrr-rVrrWrXrrr�test_reversed_pickle�s8""
�zListTest.test_reversed_picklecCs8gd�}dg|ddtj�<|�|ddtj�dg�dS)N)rrrrr/rrr)rrr)r!rrrr�test_step_overflow�szListTest.test_step_overflowcCsPGdd�dt�}|�t��d|ddg�Wd�dS1s!wYdS)Nc@seZdZdS)z*ListTest.test_no_comdat_folding.<locals>.LN)�__name__�
__module__�__qualname__rrrr�L�r5rf)rrr)rrr#)r!rfrrr�test_no_comdat_folding�s"�zListTest.test_no_comdat_foldingcstG�fdd�d�}G�fdd�d�}G�fdd�d�}|�g�|�g�|���k�|�g�dg}|��|k�dS)Nc�eZdZ�fdd�ZdS)z9ListTest.test_equal_operator_modifying_operand.<locals>.Xc����tSr��clear�NotImplemented�r!�other��list2rr�__eq__��z@ListTest.test_equal_operator_modifying_operand.<locals>.X.__eq__N�rcrdrerqrrorr�X��rtcrh)z9ListTest.test_equal_operator_modifying_operand.<locals>.Ycrirrjrm��list1rrrq�rrz@ListTest.test_equal_operator_modifying_operand.<locals>.Y.__eq__Nrsrrvrr�Y�rurxcrh)z9ListTest.test_equal_operator_modifying_operand.<locals>.Zcrirrjrm��list3rrrq�rrz@ListTest.test_equal_operator_modifying_operand.<locals>.Z.__eq__Nrsrryrr�Z�rur{r)rZassertFalse)r!rtrxr{Zlist4r)rwrprzr�%test_equal_operator_modifying_operand�sz.ListTest.test_equal_operator_modifying_operandcCsNdgd}t�|�}|�|t�tdgd���|�|t�ttd����dS)Nrr)r�	getsizeofrrr)r!�iterableZ	iter_sizerrr�test_preallocation�s

zListTest.test_preallocationcs�G�fdd�d�}|�g�|�t��
����Wd�n1s"wYGdd�dt�}||�g������||�g��|�t��
����Wd�n1sUwY|�|�g�d�v|�|�g�|��vdS)Ncrh)z3ListTest.test_count_index_remove_crashes.<locals>.Xcrirrjrm�r8rrrq�rrz:ListTest.test_count_index_remove_crashes.<locals>.X.__eq__Nrsrr�rrrt�rurtc@seZdZdd�ZdS)z3ListTest.test_count_index_remove_crashes.<locals>.LcSst|�tSr)�strrlrmrrrrq�rrz:ListTest.test_count_index_remove_crashes.<locals>.L.__eq__Nrsrrrrrf�srfr)r�
ValueError�indexr�count�remove)r!rtrfrr�r�test_count_index_remove_crashes�s �
�z(ListTest.test_count_index_remove_crashes)rcrdrerrOr"r%r(r+r,r:r@rHr^rarbrgr|rrr��
__classcell__rrr)rrs$#

$$
r�__main__)r�testrZtest.supportrrPZunittestZ
CommonTestrrc�mainrrrr�<module>so�