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_list.cpython-37.pyc
B

��g��@sJddlZddlmZddlZddlZGdd�dej�ZedkrFe��dS)�N)�
list_testscs�eZdZeZdd�Zdd�Z�fdd�Zdd�Z�fd	d
�Z	dd�Z
d
d�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Z�ZS)�ListTestcCs|�tg�g�ddddg}t|�}|�||�|�||k	�|�td�g�|�td�ddddg�|�td�g�|�td�d	d
ddg�|�td
d�td�D��dddddg�tjdkr�|�ttttjd��g}|�dd�|D��|�|g�dS)Nr����)rrrr�Zspam�s�p�a�mcss|]}|dr|VqdS)rNr)�.0�xrr�*/usr/local/lib/python3.7/test/test_list.py�	<genexpr>sz&ListTest.test_basic.<locals>.<genexpr>�
���	i���css|]}|VqdS)Nr)r
�yrrrr)s)	�assertEqual�list�
assertTrue�range�sys�maxsize�assertRaises�MemoryError�extend)�selfZl0_3Zl0_3_bisrrrr�
test_basic	s 
zListTest.test_basicc	Cs&|�td��tgd�WdQRXdS)Nzkeyword argument)Zsequence)ZassertRaisesRegex�	TypeErrorr)rrrr�test_keyword_args,szListTest.test_keyword_argscs&t���|�g�|�dg�dS)N�*)�super�
test_truthr)r)�	__class__rrr%0s
zListTest.test_truthcCs|�ggk	�dS)N)r)rrrr�
test_identity5szListTest.test_identitycsFt���|�tg�d�|�tdg�d�|�tdddg�d�dS)Nrrrr)r$�test_lenr�len)r)r&rrr(8s
zListTest.test_lencCsbddddg}ttjddt|��}dd�}dd	�}|�ttf|||�|�ttf|||�dS)
N�r�rrcSs||S)Nr)r�brrr�mulA�z#ListTest.test_overflow.<locals>.mulcSs||9}dS)Nr)rr,rrr�imulBr.z$ListTest.test_overflow.<locals>.imul)�intrrr)rr�
OverflowError)r�lst�nr-r/rrr�
test_overflow>szListTest.test_overflowcs �fdd�}|d�|d�dS)Ncs6dg|}t|�}��|dd�dg|�d�dS)Nr�[z, �0�])�reprr�join)r3�lr	)rrr�checkHs
z'ListTest.test_repr_large.<locals>.checkri@Br)rr;r)rr�test_repr_largeFszListTest.test_repr_largec	Cs�|�ddddg�}ddddd	d
g}�x�ttjd�D�]z}t|�}t�||f|�}t�|�\}}||dd�<|�t|�t|��|�t	|�|�t
|�t�||f|�}t�|�\}}||dd�<|�t|�t|��|�t	|�|dd��xtdt|��D]}t
|�q�Wt�||f|�}t�|�\}}||dd�<|�t|�t|��|�t	|�|t|�d��|�t
t
|�t�||f|�}t�|�\}}||dd�<|�t	|�g�q4WdS)Nr*rr+rr���
��r)�	type2testr�pickle�HIGHEST_PROTOCOL�iter�dumps�loadsr�typer�nextr)r�
StopIteration)	r�orig�data�proto�itorig�d�itr�irrr�test_iterator_picklePs6zListTest.test_iterator_picklec	Cs�|�ddddg�}ddddd	d
g}�x�ttjd�D�]�}t|�}t�||f|�}t�|�\}}||dd�<|�t|�t|��|�t	|�|t
|�ddd��t|�t�||f|�}t�|�\}}||dd�<|�t|�t|��|�t	|�|t
|�d
dd��x tdt
|��D]}t|��qWt�||f|�}t�|�\}}||dd�<|�t|�t|��|�t	|�g�|�t
t|�t�||f|�}t�|�\}}||dd�<|�t	|�g�q4WdS)Nr*rr+rrr=r>r?r@rAr���r)rBrrCrD�reversedrFrGrrHrr)rIrrJ)	rrKrLrMrNrOrPrrQrrr�test_reversed_picklets6""zListTest.test_reversed_picklecCs>dddddg}dg|ddtj�<|�|ddtj�dg�dS)Nrrrrr*)rrr)rrrrr�test_step_overflow�szListTest.test_step_overflowc	Cs:Gdd�dt�}|�t��d|ddg�WdQRXdS)Nc@seZdZdS)z*ListTest.test_no_comdat_folding.<locals>.LN)�__name__�
__module__�__qualname__rrrr�L�srZ)rrr)rrr!)rrZrrr�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)NcseZdZ�fdd�ZdS)z9ListTest.test_equal_operator_modifying_operand.<locals>.Xcs���tS)N)�clear�NotImplemented)r�other)�list2rr�__eq__�sz@ListTest.test_equal_operator_modifying_operand.<locals>.X.__eq__N)rWrXrYr`r)r_rr�X�sracseZdZ�fdd�ZdS)z9ListTest.test_equal_operator_modifying_operand.<locals>.Ycs���tS)N)r\r])rr^)�list1rrr`�sz@ListTest.test_equal_operator_modifying_operand.<locals>.Y.__eq__N)rWrXrYr`r)rbrr�Y�srccseZdZ�fdd�ZdS)z9ListTest.test_equal_operator_modifying_operand.<locals>.Zcs���tS)N)r\r])rr^)�list3rrr`�sz@ListTest.test_equal_operator_modifying_operand.<locals>.Z.__eq__N)rWrXrYr`r)rdrr�Z�srer)rZassertFalse)rrarcreZlist4r)rbr_rdr�%test_equal_operator_modifying_operand�sz.ListTest.test_equal_operator_modifying_operandc	s�G�fdd�d�}|�g�|�t������WdQRXGdd�dt�}||�g������||�g��|�t������WdQRX|�|�g�d�k|�|�g�|��kdS)NcseZdZ�fdd�ZdS)z3ListTest.test_count_index_remove_crashes.<locals>.Xcs���tS)N)r\r])rr^)r2rrr`�sz:ListTest.test_count_index_remove_crashes.<locals>.X.__eq__N)rWrXrYr`r)r2rrra�srac@seZdZdd�ZdS)z3ListTest.test_count_index_remove_crashes.<locals>.LcSst|�tS)N)�strr])rr^rrrr`�sz:ListTest.test_count_index_remove_crashes.<locals>.L.__eq__N)rWrXrYr`rrrrrZ�srZr)r�
ValueError�indexr�count�remove)rrarZr)r2r�test_count_index_remove_crashes�s
z(ListTest.test_count_index_remove_crashes)rWrXrYrrBr r"r%r'r(r4r<rRrUrVr[rfrl�
__classcell__rr)r&rrs#
$$r�__main__)	rZtestrrCZunittestZ
CommonTestrrW�mainrrrr�<module>sZ