Current File : //opt/imh-python/lib/python2.7/test/list_tests.pyc
�
��Wc@sQdZddlZddlZddlmZmZdejfd��YZdS(s,
Tests common to list and UserList.UserList
i����N(ttest_supportt	seq_testst
CommonTestcBs�eZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�ZRS(cCs�|j|jg�|j��|jdddg�}|j�|j||jg��|jdddg�}|jdddg�|j||jdddg��|j|�}|jt|�t|��|j||�dS(Niiiiii(tassertEqualt	type2testt__init__tassertNotEqualtid(tselftatb((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/list_tests.pyt	test_inits
"cCs@g}dddg}|j|�}|j|�}|jt|�t|��|jt|�t|��|jt|�t|��|jt|�d�|jt|�d�|j|�|jd�|jt|�d�|jt|�d�g}x'ttj�d�D]}|g}qW|jt	t|�dS(Niiis	[0, 1, 2]is[0, 1, 2, [...], 3]id(
RRtstrtreprtappendtxrangetsystgetrecursionlimittassertRaisestRuntimeError(Rtl0tl2ta0ta2ti((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/list_tests.pyt	test_reprs"


c	Cs�|jtd��}|j|�|jtdd��|j|�|jd�z`ttjd��}||IWdQXttjd��#}|j|j�t	|��WdQXWdt
jtj�XdS(Ni�i�twbtrb(RRRtextendtopenRtTESTFNRtreadR
tostremove(Rtdtfo((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/list_tests.pyt
test_print5s


&cCs!|jtd��}|jt|jtddd�dddg�|jt|jtdd�d�|jt|jtddd�ddg�|jt|jdd�dddg|tddd�<|j||jddddddd	d
ddddd
dddddddg��dS(Niii
iiitxiiii	iii
iiiiii(	RtrangeRt
ValueErrort__setitem__tslicet	TypeErrort__getitem__R(RR	((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/list_tests.pyttest_set_subscriptCs."+*cCs�|jtd��}t|�}|jt|�|jtddd���|jt|j�|jtt|j���|j��|jtt	tdddg��dS(Niii����iii(
RR&treversedRtlistRt
StopIterationtnextR*tlen(RR	tr((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/list_tests.pyt
test_reversedNs+
cCsF|jddg�}d|d<d|d<|j||jddg��d|d<|j||jddg��d|d<|j||jddg��|jt|jdd�|jt|jdd�|jg�}|jt|jdd�|jt|jdd�|jt|j�|jdddd	d
g�}d|d<d|d<d	|d
<|j||jddd	d	d
g��d|d<d|d<d|d<|j||jdddd	d
g��d|d<d|d<|j||jdddddg��d|d<d|d<|j||jdddddg��dS(Niiidi�i����i����i����iiillliiiiXl����icl����ii	(RRRt
IndexErrorR(R*(RR	((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/list_tests.pyttest_setitemXs:






(


(

(

cCs	|jddg�}|d=|j|dg�|d=|j|g�|jddg�}|d=|j|dg�|d=|j|g�|jddg�}|jt|jd�|jt|jd�|jg�}|jt|jd�|jt|j�dS(Niii����i����i����i(RRRR4t__delitem__R*(RR	((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/list_tests.pyttest_delitemys c
Csddg}|j|�}xtdd�D]�}|| ||*|j||�|}|| ||*|j||�||||)|j||�|}||||)|j||�xftdd�D]U}|||!|||+|j||�|}|||!|||+|j||�q�Wq+W|}ddg|d*|j|ddddg�g|d)|j|g�|jddddd	g�}||d*|j||jddddd	d	g��|jddddd	g�}||d)|j||jdddddd	g��|jddddd	g�}||dd+|j||jdddddd	d	g��|jg�}ttd
��|(|j||jtd
���|jt|jddd	�|jt|jtddd	��|jt|j�|jt|j�dS(Niii����ii����i����iiii
(	RR&RttupleRR*t__setslice__R(R)(RtlR	RRtjtaa2((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/list_tests.pyt
test_setslice�sP

+
+
."cCs|jddg�}|dd5|dd5|j||jg��|jddg�}|dd5|dd5|j||jg��|jddg�}|dd5|j||jdg��|jddg�}|d	d
5|j||jdg��|jddg�}|d3|d4|j||jg��|jddg�}|d3|d4|j||jg��|jddg�}|d3|j||jdg��|jddg�}|d
3|j||jdg��|jddg�}|2|j||jg��dS(Niiillli����i����l����l����(RR(RR	((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/list_tests.pyt
test_delslice�s>





cCso|jg�}|jd�|jd�|jd�|j||jdddg��|jt|j�dS(Niii(RRRRR*(RR	((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/list_tests.pyttest_append�s


"c	Cs
|jdg�}|jd�}|}|j|�|j|||�|j|jg��|j|||�|j|�|j||jddddddg��|jd�}|jd�|j|td��|jt|jd�|jt|j�dS(Niitspamteggstspameggs(ii(RRRR.RR*tNone(Rta1RR	((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/list_tests.pyttest_extend�s

+
cCs�|jdddg�}|jdd�|jdd�|jdd�|j|ddddddg�|}|jdd�|jdd�|jd	d
�|j||jddddddddd
g	��|jt|j�dS(Niiii����i����tfooi8���tlefti�tright(RtinsertRRR*(RR	R
((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/list_tests.pyttest_inserts"4cCs�|jdddg�}|j�|j|ddg�|jd�|j|dg�|jt|jd�|jd�|j|g�|jt|j�|jt|jdd�|jddddd	g�}dS(
Ni����iiii*i
iii((RtpopRRR4R*(RR	((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/list_tests.pyttest_pops


cs|jdddg�}|jd�|j|ddg�|jd�|j|dg�|jd�|j|g�|jt|jd�|jt|j�dtfd��Y�dd�fd��Y}|jddddg�}|j�|j|��d	d�fd
��Y}|jd�}|jd�|j||jd
��|jd�|j||jd��|jt|jd�|j||jd��|jdd|�dg�}|j|�}|j�|jd�x-t||�D]\}}|j||�q�WdS(NiitBadExccBseZRS((t__name__t
__module__(((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/list_tests.pyRM/stBadCmpcseZ�fd�ZRS(cs|dkr���ntS(Ni(tFalse(Rtother(RM(sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/list_tests.pyt__eq__3s(RNRORS((RM(sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/list_tests.pyRP2siitBadCmp2cseZ�fd�ZRS(cs
���dS(N((RRR(RM(sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/list_tests.pyRS<s(RNRORS((RM(sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/list_tests.pyRT;stabcdefghcijtct
abdefghcijt	abdefghijR	R
(((	RR!RRR'R*t	ExceptiontziptassertIs(RR	RPRTR"teR%ty((RMsh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/list_tests.pyttest_remove"s4




cs�|jdddg�d}|j|jd�d�|j|jd�d�|j|jd�d�|jt|j�dtfd��Y�dd	�fd��Y}|j�|j|��dS(
NiiiiRMcBseZRS((RNRO(((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/list_tests.pyRMWsRPcseZ�fd�ZRS(cs|dkr���ntS(Ni(RQ(RRR(RM(sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/list_tests.pyRS[s(RNRORS((RM(sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/list_tests.pyRPZs((RRtcountRR*RY(RR	RP((RMsh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/list_tests.pyt
test_countOscs�|jddg�}|j|jd�d�|j|jd�d�|jt|jd�|jddddddg�}|j|jd�d�|j|jd�d�|j|jdd�d�|j|jdd�d�|j|jdd�d�|j|jddd�d�|jt|jddd�|jt|j�d	tfd
��Y�dd�fd��Y}|jddddg�}|j�|j|��|jddddddg�}|j|jd�d�|j|jdd�d�|j|jdd
�d�|j|jdd�d�|j|jdd�d�|j|jdd�d�|j|jddd�d�|j|jddd�d�|j|jdd
tj	dtj	�d�|jt|jddtj	d
tj	�|jt|jddd�|j
d�|jt|jddd�|j||jdddddg��ddd��Y}|j�}gtd�D]}||�^q�|(|jt|jd�dS(Niiii����i����i����iiRMcBseZRS((RNRO(((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/list_tests.pyRMssRPcseZ�fd�ZRS(cs|dkr���ntS(Ni(RQ(RRR(RM(sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/list_tests.pyRSws(RNRORS((RM(sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/list_tests.pyRPvsi����i����tEvilCmpcBseZd�Zd�ZRS(cSs
||_dS(N(tvictim(RRb((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/list_tests.pyR�scSs|j2tS(N(RbRQ(RRR((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/list_tests.pyRS�s(RNRORRS(((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/list_tests.pyRa�s	id(((
RRtindexRR'R_R*RYRtmaxintR!RRC(RtuRPR	Rat_((RMsh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/list_tests.pyt
test_indexbsH!!-*
(&cCs�|jdddddg�}|}|j�|j|dddddg�|j�|j||�|jt|jd�dS(Ni����i����iiii*(RtreverseRRR*(RRetu2((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/list_tests.pyttest_reverse�s

cCs*tjdtf��|j�WdQXdS(Ns!the cmp argument is not supported(Rtcheck_py3k_warningstDeprecationWarningt
_test_sort(R((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/list_tests.pyt	test_sort�scs~|jddg�}|j�|j|ddg�|jdddddg�}|j�|j||jdddddg��|jt|jdd�d�}|j|�|j||jdddddg��d�}|jtd	����j|�|jt�jd��fd
�}|jt�j|�|jt�jd��|jt�jdddd�dS(Niiii����i����i*cSs
t||�S(N(tcmp(R	R
((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/list_tests.pytrevcmp�scSst|d|d�S(Nii(Ro(R%R]((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/list_tests.pytmyComparison�sics�jd�t||�S(Ni(RRo(R%R](tz(sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/list_tests.pytselfmodifyingComparison�s
cSsdS(Nts((R%R]((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/list_tests.pyt<lambda>�s(RtsortRRR*R&R'(RReRpRqRs((Rrsh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/list_tests.pyRm�s$

(	
(	
cCs3|jd�}d|d*|j|td��dS(NR@thitham(RRR.(RRe((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/list_tests.pyt
test_slice�s
cCs�tt|�j�|jddg�}|}|ddg7}|j||�|jd�}|d7}|j||jd��|jt|jd�dS(NiiiiR@RARB(
tsuperRt	test_iaddRR[RRR*t__iadd__RC(RReRi((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/list_tests.pyR{�s
c	Cs�|jddg�}|d9}|j||jddddddg��|d9}|j||jg��|jg�}t|�}|d9}|jt|�|�dS(Niiii
(RRR(RReRttoldid((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/list_tests.pyt	test_imul�s
+

c
Cs�|jdddddg�}|ddd�=|j||jddg��|jtd��}|ddd�=|j||jdddg��|jtd��}|ddd�=|j||jddddg��|jtd��}|ddd	�=|j||jdddddd
ddd
g	��|jtd��}dgd|ddd�<|j||jdddddddddd
g
��|jtd��}dgd|ddd�<|j||jddddddd
dddg
��|jtd��}||ddd�<|j||jddddg��|jtd��}|}|}|jddg�|dd+|jddg�|tdd�<|jddg�|ddd�<|j||�|j||�|jtd��}ttd��|ddd�<|j||jdddddddddd
g
��|jtd��}|d
dd�=dS(Niiiiiii����i
i�iiii	i����i����ttwotelementsiMl(RRR&R)RCR8(RR	R
RV((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/list_tests.pyttest_extendedslicing�sD"%477%""7cCs0dtfd��Y}|jtt|��dS(NtFcBseZd�ZRS(cSs
t�dS(N(tKeyboardInterrupt(R((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/list_tests.pyt__iter__s(RNROR�(((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/list_tests.pyR�s(tobjectRR�R.(RR�((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/list_tests.pyt#test_constructor_exception_handlingscCs�|jdddg�}t|�}t|�}x|D]}t|�q7W|jd�|jt|�g�|jt|�dg�|j||jddddg��dS(Niiii	(RtiterR0RRR.(RR	texhittempitR%((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/list_tests.pyttest_exhausted_iterators

(RNRORRR$R,R3R5R7R=R>R?RERJRLR^R`RgRjRnRmRyR{R~R�R�R�(((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/list_tests.pyR
s2					
	!		0	)					
	-		9	
		!		
		)	(t__doc__RR ttestRRR(((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/list_tests.pyt<module>s