Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.9/test/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.9/test/__pycache__/test_index.cpython-39.opt-1.pyc

a

��g|!�@s ddlZddlmZddlZejZGdd�d�ZGdd�de�ZGdd�dej	�Z
Gd	d
�d
�ZGdd�deej	�ZGd
d�d�Z
Gdd�deej	�ZGdd�deej	�ZGdd�deej	�ZGdd�deej	�ZGdd�deej	�ZGdd�dej	�ZGdd�dej	�Zedk�re��dS)�N)�supportc@seZdZdd�ZdS)�newstylecCs|jS�N)�ind��self�r�+/usr/local/lib/python3.9/test/test_index.py�	__index__sznewstyle.__index__N��__name__�
__module__�__qualname__r
rrrr	rsrc@seZdZdd�ZdS)�TrapIntcCst|�Sr)�intrrrr	r
szTrapInt.__index__Nrrrrr	r
src@sLeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dS)�BaseTestCasecCst�|_t�|_dSr)r�o�nrrrr	�setUpszBaseTestCase.setUpcCs<d|j_d|j_|�t�|j�d�|�t�|j�d�dS�N����)rrr�assertEqual�operator�indexrrrr	�
test_basicszBaseTestCase.test_basiccCs�d|j_d|j_t|j|j|j�}tddd�}|�|�|j�|�d��t|j|j|j�}tddd�}|�|�|j�|�d��dS)N�r)rrr�slicer�indices)rZslcZ	check_slcrrr	�
test_sliceszBaseTestCase.test_slicecCszd|j_d|j_|�d��d�|�d��d�|�|j��d�|�|j��d�|�d��d�|�d��d	�dS)
N����i����TrFr)rrrrr
rrrr	�
test_wrappers#szBaseTestCase.test_wrapperscCsLttd��}|�|td�td��|dd��|�tt���d�d�dS)N�
r!r)rrr)�list�rangerrrr)r�rrrr	�test_subclasses-s$zBaseTestCase.test_subclassescCsdd|j_d|j_|�ttj|j�|�ttj|j�|�tt|j�jd�|�tt|j�jd�dS)N�dumb�badr)	rrr�assertRaises�	TypeErrorrrrrrrrr	�
test_error2szBaseTestCase.test_errorcCsVGdd�dt�}|d�}|��}t�|�}|�|d�|�|d�|�t|�t�dS)Nc@seZdZdd�ZdS)z8BaseTestCase.test_int_subclass_with_index.<locals>.MyIntcSstt|��dS)Nr)r�strrrrr	r
>szBBaseTestCase.test_int_subclass_with_index.<locals>.MyInt.__index__Nrrrrr	�MyInt=sr0r#�)rr
rrr�assertIs�type)rr0Zmy_intZdirect_indexZoperator_indexrrr	�test_int_subclass_with_index:s
z)BaseTestCase.test_int_subclass_with_indexcCs�Gdd�d�}Gdd�dt�}|�}|�t��t�|�}Wd�n1sN0Y|�|d�|�}t�|�}|�|d�dS)Nc@seZdZdd�ZdS)z<BaseTestCase.test_index_returns_int_subclass.<locals>.BadIntcSsdS�NTrrrrr	r
LszFBaseTestCase.test_index_returns_int_subclass.<locals>.BadInt.__index__Nrrrrr	�BadIntKsr6c@seZdZdd�ZdS)z=BaseTestCase.test_index_returns_int_subclass.<locals>.BadInt2cSsdSr5rrrrr	r
PszGBaseTestCase.test_index_returns_int_subclass.<locals>.BadInt2.__index__Nrrrrr	�BadInt2Osr7rr)rZassertWarns�DeprecationWarningrrr)rr6r7Zbad_intrrrr	�test_index_returns_int_subclassJs(
z,BaseTestCase.test_index_returns_int_subclassN)rr
rrrrr$r)r.r4r9rrrr	rs

rc@sLeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dS)�SeqTestCasecCs$t�|_t�|_t�|_t�|_dSr)rrr�o2�n2rrrr	r`szSeqTestCase.setUpcCsHd|j_d|j_|�|j|j|jd�|�|j|j|jd�dSr�rrrr�seqrrrr	�
test_indexfszSeqTestCase.test_indexcCsld|j_d|j_d|j_d|j_|�|j|j|j�|jdd��|�|j|j|j�|jdd��dS)Nr�rr )rrr;rr<rr>rrrr	rls$zSeqTestCase.test_slicecCs:t|j�}t|d�|j_|d|j_|�|j|jd�|jdd��|�|jd|j�|j�|�|j|jd�|jdd��|�|jd|j�|j�|d|j_t|d�|j_|�|j|jd�|j�|�|jd|j�|jdd��|�|j|jd�|j�|�|jd|j�|jdd��dS)Ng�?rr)	�lenr>rrrrrr;r<)rZseqlenrrr	�test_slice_bug7532ts
"""zSeqTestCase.test_slice_bug7532cCs|d|j_d|j_|�|j|j|jd�|�|j|j|jd�|�|j|j|jd�|�|j|j|jd�dS)Nr@rr=rrrr	�test_repeat�szSeqTestCase.test_repeatcCs�d|j_d|j_|�|j�|j�|jd�|�|j�|j�|jd�|�|j�|j�|jd�|�|j�|j�|jd�|�|j�|j�|jd�|�|j�|j�|jd�dS)Nr r!)rrrrr>�__getitem__�__mul__�__rmul__rrrr	r$�szSeqTestCase.test_wrapperscCs|�|jt�|jd�dS)Nr)rr>rrrrr	r)�szSeqTestCase.test_subclassescCsld|j_d|j_dd�}|�t||j|�|�t||j|�dd�}|�t||j|�|�t||j|�dS)Nr*r+cSs
|j|Sr�r>��x�objrrr	�<lambda>��z(SeqTestCase.test_error.<locals>.<lambda>cSs|j|d�SrrGrHrrr	rK�rL)rrrr,r-)rZindexobjZsliceobjrrr	r.�szSeqTestCase.test_errorN)rr
rrr?rrBrCr$r)r.rrrr	r:]s
r:c@s$eZdZgd�Zdd�Zdd�ZdS)�ListTestCase�rr%���(�2cCs�d|j_d|j_td�}||j=||j=d||j<d||j<|�|td��gd�}|�|jd�|�|gd	��|�|j�|�|gd
��dS)Nrrzab!cdefghi!j�X�YZ
abYdefghXj)r!r"r#r1�	r%��here)r!r"rWr1rUr%rV)r!r"r1rUr%rV)rrrr&r�__setitem__�__delitem__)r�lstrrr	�test_setdelitem�s

zListTestCase.test_setdelitemcCs�d|j_d|j_ddg}||j9}|�|gd��||j9}|�|gd�d�gd�}|�|j�}|�||�|�|gd�d�dS)Nrr@r"r )r"r r"r )r!r"r#r1rUrV)rrrr�__imul__r2)rrZ�l2rrr	�test_inplace_repeat�s

z ListTestCase.test_inplace_repeatN)rr
rr>r[r^rrrr	rM�srMc@s@eZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZeZdd�Z	d
S)�NewSeqcCst|�|_dSr)r&�_list)r�iterablerrr	�__init__�szNewSeq.__init__cCs
t|j�Sr)�reprr`rrrr	�__repr__�szNewSeq.__repr__cCs
|j|kSr�r`)r�otherrrr	�__eq__�sz
NewSeq.__eq__cCs
t|j�Sr)rAr`rrrr	�__len__�szNewSeq.__len__cCs|�|j|�Sr)�	__class__r`�rrrrr	rE�szNewSeq.__mul__cCs
|j|Srre)rrrrr	rD�szNewSeq.__getitem__N)
rr
rrbrdrgrhrErFrDrrrr	r_�sr_c@seZdZdZdS)�
TupleTestCaserNN�rr
rr>rrrr	rk�srkc@seZdZed�ZdS)�ByteArrayTestCase�this is a testN)rr
r�	bytearrayr>rrrr	rm�srmc@seZdZdZdS)�
BytesTestCasernNrlrrrr	rp�srpc@seZdZdZdS)�StringTestCasezthis is a testNrlrrrr	rq�srqc@seZdZed�ZdS)�NewSeqTestCaserNN)rr
rr_r>rrrr	rr�srrc@seZdZdd�ZdS)�
RangeTestCasecCs>t�}d|_|�tdd�|d�|�tdd��|�d�dS)Nr!rrOr")rrrr'rDrjrrr	�
test_range�szRangeTestCase.test_rangeN)rr
rrtrrrr	rs�srsc@s,eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�OverflowTestCasecCsdd|_|j|_dS)Nr�d)�pos�negrrrr	r�s
zOverflowTestCase.setUpcCs,|�|j��|j�|�|j��|j�dSr)rrwr
rxrrrr	�test_large_longs�sz!OverflowTestCase.test_large_longscCs�Gdd�d�}|�}|�||j|j�|�||j|j�|�||j|j��t�dtdf�|�||j|jd��t�dtdf�dS)Nc@seZdZdd�Zdd�ZdS)z.OverflowTestCase.test_getitem.<locals>.GetItemcSsdSrrrrrr	rhsz6OverflowTestCase.test_getitem.<locals>.GetItem.__len__cSs|Srr)r�keyrrr	rDsz:OverflowTestCase.test_getitem.<locals>.GetItem.__getitem__N)rr
rrhrDrrrr	�GetItemsr{rr)rrwrxr�maxsize)rr{rIrrr	�test_getitem�s��zOverflowTestCase.test_getitemcs,��t�fdd����t�fdd��dS)Ncs
d�jS�N�a)rwrrrr	rKrLz7OverflowTestCase.test_sequence_repeat.<locals>.<lambda>cs
d�jSr~)rxrrrr	rKrL)r,�
OverflowErrorrrrr	�test_sequence_repeat
sz%OverflowTestCase.test_sequence_repeatN)rr
rrryr}r�rrrr	ru�sru�__main__)Zunittest�testrrZMAX_Py_ssize_tr|rrrZTestCaserr:rMr_rkrmrprqrrrsrur�mainrrrr	�<module>s$OF"	


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