Current File : //opt/imh-python/lib/python2.7/test/test_array.pyo
�
��Wc@s�dZddlZddlZddlmZddlmZddlZddlZddl	m
Z
mZmZddl
Z
dejfd��YZdejfd	��YZgZd
Zejr�ed7Zndejfd
��YZeje�dejfd��YZdefd��YZdefd��YZeje�ejrydefd��YZeje�ndefd��YZdefd��YZdefd��YZdefd��YZeje�defd��YZeje�d efd!��YZeje�d"efd#��YZ eje �d$efd%��YZ!eje!�d&efd'��YZ"eje"�d(efd)��YZ#eje#�d*efd+��YZ$eje$�ej%d,ejfd-��Y�Z&eje&�d.efd/��YZ'd0e'fd1��YZ(eje(�d2e'fd3��YZ)eje)�e*d4�Z+e,d5kr�e+d6e-�ndS(7s(Test the arraymodule.
   Roger E. Masse
i����N(ttest_support(tproxy(tloadstdumpstHIGHEST_PROTOCOLt
ArraySubclasscBseZRS((t__name__t
__module__(((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyR
stArraySubclassWithKwargscBseZdd�ZRS(cCstjj||�dS(N(tarrayt__init__(tselfttypecodetnewarg((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyR
sN(RRtNoneR
(((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyRstcbBhHiIlLfdtutBadConstructorTestcBs#eZd�Zejd��ZRS(cCs�|jttj�|jttjdd�|jttjd�|jttjd�|jttjd�|jttjd�|jttjd�dS(Ntspami*txxtitxs�(tassertRaisest	TypeErrorR	t
ValueError(R((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyttest_constructorscCs\|jttjd�|jttjd�|jttjd�|jttjd�dS(Nuxxuuxu€(RRR	R(R((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyttest_unicode_constructor$s(RRRRtrequires_unicodeR(((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyRs		tBaseTestcBs�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�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z!d �Z"d!�Z#d"�Z$d#�Z%d$�Z&d%�Z'd&�Z(d'�Z)e*j+e,e-d(�d)�d*��Z.d+�Z/RS(,cCs|j||�dS(N(tassertEqual(Rtentry1tentry2((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pytassertEntryEqual6scCs"ttj|j�dtt�S(Ni(t	typecodestindexRtlen(R((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pytbadtypecode9scCs^tj|j�}|j|j|j�|j|j|j�|jttj|jd�dS(N(	R	RRtassertGreaterEqualtitemsizetminitemsizeRRR(Rta((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyR=scCswtj|j�}|j|jd�|jt|�d�tj|j|j�}|jt|�t|j��dS(Nii(R	RtappendtexampleRR#(RR(((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyttest_lenCs
cCs�tj|j|j�}|jt|jd�|j�}|j|t�|jt	|�d�|j|dt
tf�|j|dt
�|j|dt	|��dS(Ni*iii(R	RR*RRtbuffer_infotassertIsInstancettupleRR#tinttlong(RR(tbi((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyttest_buffer_infoKscCs�tj|j|j�}|jt|jd�|jdkr�tj|j|j�}|j�|jdkr�|j||�n|j||�|j�|j||�ndS(Ni*iiii(iiii(	R	RR*RRtbyteswapR&RtassertNotEqual(RR(tb((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyt
test_byteswapUs

cCscddl}tj|j|j�}|j|�}|jt|�t|��|j||�dS(Ni����(tcopyR	RR*R4tidR(RR7R(R5((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyt	test_copybs
cCscddl}tj|j|j�}|j|�}|jt|�t|��|j||�dS(Ni����(R7R	RR*tdeepcopyR4R8R(RR7R(R5((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyt
test_deepcopyis
cCs	xttd�D]�}tj|j|j�}tt||��}|jt|�t|��|j	||�t
|j|j�}d|_tt||��}|jt|�t|��|j	||�|j	|j|j�|j	t|�t|��qWdS(Nii
(
trangeRR	RR*RRR4R8RRRttype(RtprotocolR(R5((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyttest_pickleps	cCs�x�ttd�D]�}tj|j�}tt||��}|jt|�t|��|j||�t	|j�}d|_
tt||��}|jt|�t|��|j||�|j|j
|j
�|jt|�t|��qWdS(Nii
(R<RR	RRRR4R8RRRR=(RR>R(R5((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyttest_pickle_for_empty_arrays	cCs�tj|j|j�}|jd|jd�|jt|�dt|j��|j|d|d�|jt|j�|jt|jd�|jt|jdd�tj|j|j�}|jd|jd�|j|tj|j|jd |jd |jd��tj|j|j�}|jd|jd�|j|tj|j|jd |j��tj|j|j�}|jd|jd�|j|tj|j|j|jd ��dS(Niii����i���i�(	R	RR*tinsertRR#RRR(RR(((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyttest_insert�s0#'$cCs�tj|jd|j�}|jt|j�|jt|jtj��tj	tj
�ttj
d�}z|j|�|j�tj|j�}ttj
d�}|jt|j
�|jt|j
tj�t|j��|j
|t|j��|j|tj|j|j��|j||�|j
|t|j��|j||�|jt|j
|d�|j�Wd|js�|j�ntj	tj
�XdS(Nitwbtrbi(R	RR*RRttofilet	cStringIOtStringIORtunlinktTESTFNtopentclosetfromfileR#RR4tEOFErrortclosed(RR(tfR5((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyttest_tofromfile�s2

"	
cCsltj|j�}ttjd�}z&|jt|j|t|j	��Wd|j
�tjtj�XdS(NRC(R	RRJRRIRtIOErrorRLR#R*RKRH(RR(RO((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyttest_fromfile_ioerror�s&
cCstj|jd|j�}ttjd�}z�|j|�|j�tj|j�}ttjd�}|j|t	|j��|j
|tj|j|j��|j||�|j|t	|j��|j
||�|j�Wd|js|j�ntj
tj�XdS(NiRCRD(R	RR*RJRRItwriteRKRLR#RR4RNRH(RR(ROR5((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyttest_filewrite�s 

"	
cCs�tj|jd|j�}tj|j�}|jt|jd�|jt|j�|jt|jd�|jt|jdg�|j|j��|j||�dS(Nii*(	R	RR*RRttolisttfromlistRR(RR(R5((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyttest_tofromlist�scCs�tj|jd|j�}tj|j�}|jt|jd�|jt|j�|jt|jd�|jt|j|�|j|j��|j||�|j	dkr�|jt|jd�ndS(Nii*iR(
R	RR*RRttostringt
fromstringRRR&(RR(R5((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyttest_tofromstring�scCsxtj|jd|j�}|j|tt|�itjd6��tj|j�}|jt|�d|j�dS(NiR	sarray('%s')(R	RR*Rtevaltrepr(RR(((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyt	test_reprs)cCs*tj|jd|j�}t|�dS(Ni(R	RR*tstr(RR(((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyttest_strscCs�tj|j|j�}|j|dkt�|j|dkt�|j||kt�|j||kt�|j||kt�|j||kt�|j||kt�|j||kt�tj|j|j�}tj|j|j�}|j|d|kt�|j|d|kt�|j|d|kt�|j|d|kt�|j|d|kt�|j|d|kt�|j||kt�|j||kt�|j||kt�|j||kt�|j||kt�|j||kt�|j||kt�|j||kt�|j||kt�|j||kt�|j||kt�|j||kt�dS(Ni*i(R	RR*tassertIstFalsetTruetsmallerexamplet
biggerexample(RR(taltab((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyttest_cmps:c	Cs�tj|j|j�tj|j|jddd��}|j|tj|j|j|jddd���tj|j��}|jt|j|�|jt|jd�dS(Ni����tbad(R	RR*RR$RRt__add__(RR(R5((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyttest_add/s&-cCs%tj|j|jddd��}|}|tj|jd|j�7}|j||�|j|tj|j|jddd�d|j��tj|j|j�}||7}|j|tj|j|j|j��tj|j��}|jt|j|�|jt|j	d�dS(Ni����iRh(
R	RR*R`RR$RRRit__iadd__(RR(R5((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyt	test_iadd<s% 1
 cCsdtj|j|j�}|j|tj|jd|j��tj|j|j�d}|j|tj|j|jd��dtj|j|j�}|j|tj|j��dtj|j|j�}|j|tj|j��|jt|jd�dS(Niii����Rh(R	RR*RRRt__mul__(RR(((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyttest_mulQs"cCsXtj|j|j�}|}|d9}|j||�|j|tj|jd|j��|d9}|j||�|j|tj|j��|d9}|j||�|j|tj|j��|d9}|j||�|j|tj|j��tj|j|j�}|d9}|j|tj|j��|jt|jd�dS(Niii�i����Rh(R	RR*R`RRRt__imul__(RR(R5((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyt	test_imulls(




cCs+tj|j|j�}|j|d|jd�|j|d|jd�|j|d|jd�|j|d|jd�|j|t|j�d|jd�|j|t|j�|jd�|jt|j�|jt|jt|j��|jt|jt|j�d�dS(Nili����l����i(	R	RR*R R#RRt__getitem__t
IndexError(RR(((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyttest_getitem�s(%cCs(tj|j|j�}|d|d<|j|d|d�tj|j|j�}|d|d<|j|d|d�tj|j|j�}|d|d<|j|d|d�tj|j|j�}|d|d<|j|d|d�tj|j|j�}|d|t|j�d<|j|d|d�tj|j|j�}|d|t|j�<|j|d|d�|jt|j�|jt|jd�|jt|jdd�|jt	|jt|j�|jd�|jt	|jt|j�d|jd�dS(Ni����ill����i(
R	RR*R R#RRt__setitem__RRr(RR(((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyttest_setitem�s:cCs�tj|j|j�}|d=|j|tj|j|jd��tj|j|j�}|d=|j|tj|j|jd ��tj|j|j�}|t|j�d=|j|tj|j|jd ��tj|j|j�}|t|j�=|j|tj|j|jd��|jt|j�|jt|jd�|jt	|jt|j��|jt	|jt|j�d�dS(Niii����(
R	RR*RR#RRt__delitem__RRr(RR(((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyttest_delitem�s0cCs�tj|j|j�}|j||�|j|dtj|j|jd��|j|d tj|j|jd ��|j|d tj|j|jd ��|j|dtj|j|jd��|j|dd!tj|j��|j|dd!tj|j��|j|dtj|j��|j|d|�|j|d |�|j|d tj|j��|j|dd!|�|j|dd!tj|j��dS(Nii����ii�i���i�(R	RR*R(RR(((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyt
test_getslice�s@


c
Cs�tj|j|j�}d
}xj|D]b}xY|D]Q}xH|dD]<}|jt||||��t|�|||��qCWq2Wq%WdS(Niiiiidi����i����i��i����(
iNiiiidi����i����i��i����(R	RR*RRtlist(RR(tindiceststarttstoptstep((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyttest_extended_getslices

cCsJtj|j|j�}||d*|j|tj|j|j|jd��tj|j|j�}||d*|j|tj|j|j|jd��tj|j|j�}||d)|j|tj|j|jd |j��tj|j|j�}||d)|j|tj|j|jd |j��tj|j|j�}||dd+|j|tj|j|jd |j|jd��tj|j|j�}||d)|j|tj|jd|j��tj|j|j�}||d)|j|tj|j|j��tj|j|j�}||d*|j|tj|j|j��tj|j|j�}||d*|j|tj|jd|j��tj|j|j�}||dd+|j|tj|j|jd |j|jd��tj|j|j�}||dd+|j|tj|jd|j��tj|j|j�}|jt|jddd�|jt|jt	dd�d�|jt|jt	dd�d�tj|j
��}|jt|jdd|�|jt|jt	dd�|�|jt|jt	dd�|�dS(Nii����i�ii���ii�(R	RR*RRRt__setslice__RRttsliceR$(RR(R5((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyt
test_setslices�
$
$
$
$
#




/
"""c
Csd
}x|D]}x�|D]�}x�|dD]�}tj|j|j�}t|�}||||�}|j�|||||�<tj|j|�||||�<|j|tj|j|��||||�=||||�=|j|tj|j|��q+WqWq
WdS(Niiiiidi����i����i��i����(
iNiiiidi����i����i��i����(RR	RR*RytreverseR(RRzR{R|R}R(tLtdata((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyttest_extended_set_del_slicews


"cCs�d|j}tj|j|�}|jt|j�x0|D](}|j|j|�|j|��q<W|jt|jd�|jt|j|j	�dS(Ni(
R*R	RRRR"RRRtoutside(RR*R(R((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyt
test_index�s

&cCs�d|j}tj|j|�}|jt|j�x0|D](}|j|j|�|j|��q<W|j|j|j�d�|j|jd�d�dS(Nii(	R*R	RRRtcountRR�R(RR*R(R((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyt
test_count�s

&cCs�x�|jD]y}d|j}tj|j|�}|j|�}|| ||d}|j|�|j|tj|j|��q
Wtj|j|j�}|jt|j|j�|jt|jd�dS(Nii(
R*R	RR"tremoveRRRR�R(RRR*R(tpostexample2((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyttest_remove�s

#cCs�tj|j�}|jt|j�tj|jd|j�}|jt|jdd�|jt|jd�|jt|jt|��|jt|jt|�d�|j	|jd�|jd�|j
|tj|j|jd|j��|j	|jd�|jd�|j
|tj|j|jdd!|jd|j��|j	|jd�|jd�|j	|j�|jd�|j
|tj|j|jd|jd ��dS(Nii*iiii����(R	RRRrtpopR*RRR#R R(RR(((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyttest_pop�s(! $ 2 cCsktj|j|j�}|jt|jd�|j�|j|tj|j|jddd���dS(Ni*i����(R	RR*RRR�R(RR(((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyttest_reverse�s
c	Csutj|j|j�}|jt|j�|jtj|j|jddd���|j|tj|j|j|jddd���tj|j|j�}|j|�|j|tj|j|j|j��tj|j��}|jt|j|�tj|j|j�}|j|jddd��|j|tj|j|j|jddd���dS(Ni����(R	RR*RRtextendRR$(RR(R5((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyttest_extend�s$,-
 cCs�tj|jt|j��}tj|j|j�}|j||�|jttj|jd�ddd��Y}|jttj|j|��d�}|jttj|j|��dS(Ni
tAcBseZd�ZRS(cSs
t�dS(N(tUnicodeError(R((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyt__iter__�s(RRR�(((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyR��scsst�dVdS(N(R�R(((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pytB�s((R	RtiterR*RRRR�(RR(R5R�R�((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyt'test_constructor_with_iterable_argument�s	cCsmyddl}Wntk
r0|jd�nXtj|j�}t|�g}|j|�|j�dS(Ni����sgc module not available(tgctImportErrortskipTestR	RR�R)tcollect(RR�R(tl((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyttest_coveritertraverse�s

cCsYtj|j|j�}tj��t|�}WdQX|j|d|j�d�dS(Ni(R	RR*Rtcheck_py3k_warningstbufferRRX(RR(R5((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyttest_buffers
cCs]tj|j|j�}t|�}|j|j�|j��d}|jtt	|�dS(N(
R	RR*RRRXRRtReferenceErrorR#(Rtstp((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyttest_weakref
s
tgetrefcountstest needs sys.getrefcount()cCs�x,td�D]}tjdtd��}q
Wtjd�}x,td�D]}tjdtd��}qKW|j|tjd��dS(Ni
R�i@(R<R	tsysR�R(RtiR5trc((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyttest_bug_782369scCs:tj��(tjddt�tddd�WdQXdS(NtignoreRR5R
i(twarningstcatch_warningstfilterwarningstDeprecationWarningR(R((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyttest_subclass_with_kwargss
(0RRR R$RR+R2R6R9R;R?R@RBRPRRRTRWRZR]R_RgRjRlRnRpRsRuRwRxR~R�R�R�R�R�R�R�R�R�R�R�R�tunittestt
skipUnlessthasattrR�R�R�(((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyR-sV						
	
					!				
				$	
					'	"	2		[												
			t
StringTestcBseZd�ZRS(cCsOtt|�j�tj|j|j�}|jt|jd|jd �dS(Nii(	tsuperR�RuR	RR*RRRt(RR(((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyRu's(RRRu(((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyR�%st
CharacterTestcBsGeZdZdZdZdZdZdZd�Ze	j
d��ZRS(tcsazAZ�sazAY�sazAZ�t3icCs�dtjfd��Y}|d�}|j�|j|j�d�|j|jd�d|_|j|jd�|j|jj�dg�dS(NtEditableStringcBs/eZd�Zdd�Zd�Zd�ZRS(c_stjj|d|�S(NR�(R	t__new__(tclsR�targstkwargs((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyR�6stbluecSs
||_dS(N(tcolor(RR�R�((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyR
9scSs#tjd|j�j��|(dS(NR�(R	RXtstrip(R((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyR�<scSsd|j�S(NsEditableString(%r)(RX(R((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyt__repr__?s(RRR�R
R�R�(((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyR�5s		s	test
ttestR�tredR�(R	R�RRXR�t__dict__tkeys(RR�R�((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyttest_subbclassing4s

	cCsKtj|j|j�}|jt|jtd��|jt|j�dS(NR(R	RR*RRtfromunicodetunicodet	tounicode(RR(((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyttest_nounicodeKs(RRRR*RcRdR�R'R�RRR�(((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyR�,s	tUnicodeTestcBsVeZdZedd�Zedd�Zedd�Zed�ZdZd�Z	RS(Rs\x01\u263a\x00\ufeffsunicode-escapes\x01\u263a\x00\ufefes\x01\u263a\x01\ufeffR�icCs|jttjdtdd��tjdtdd��}|jtdd��|jtdd��|jtdd��|jtd	d��|j�}|j|td
d��tdd�}tjd|�}|jt|�d�|jt|j�dS(
NR5tfootasciiRs\xa0\xc2\u1234sunicode-escapet Rs\x11abc\xff\u1234s \xa0\xc2\u1234 \x11abc\xff\u1234s&\x00="\'a\\b\x80\xff\u0000\u0001\u1234s1array('u', u'\x00="\'a\\b\x80\xff\x00\x01\u1234')(RRR	R�R�R�RR\(RR(R�((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyttest_unicode\s "	(
RRRR�R*RcRdR�R'R�(((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyR�Tst
NumberTestcBs>eZd�Zd�Zd�Zd�Zd�Zd�ZRS(c	Cstj|jtd��}|j|ddd�|�|j|ddd�tj|jdddg��|j|ddd�tj|jddg��|j|ddd�tj|jdddddg��|j|ddd�tj|jdddg��|j|ddd�tj|jddg��|j|d	d
d�|�|j|d
d	d�|ddd��|j|ddd
�tj|jdddg��|j|ddd�tj|jg��|j|ddd�tj|jg��dS(Niiiiiii����i����i����idl����dldli�i�i���i0���(R	RR<RR(RR(((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyt
test_extslicews52;52*5,c
Cs�tj|jtd��}|ddd�=|j|tj|jddg��tj|jtd��}|ddd�=|j|tj|jdddg��tj|jtd��}|ddd�=|j|tj|jddddg��tj|jtd��}|ddd	�=|j|tj|jdddddd
ddd
g	��tj|jtd��}|d
dd�=dS(Niiiiiii����i
i�iiii	iMl(R	RR<R(RR(((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyt
test_delslice�s%(+:cCs�tj|jtd��}tj|jdgd�|ddd�<|j|tj|jddddddddddg
��tj|jtd��}tj|jdgd�|ddd	�<|j|tj|jd
dddddddd
dg
��tj|jtd��}||ddd�<|j|tj|jdddd
g��tj|jtd��}|}|}tj|jtd��}||dd+||tdd�<||ddd�<dS(Ni
i*iiiiii	i����iiiii����(R	RR<RR�R(RR(R5R�tins((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyttest_assignment�s )=)=+
cCs�tj|jtd��}|jt|�td��tj|jdg�}|j|d|kt�|j|d|kt�dS(Ni
ii����i(R	RR<RRyRb(RR(R5((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyttest_iterationcontains�s
cCs�tj|j|g�}||d<|jttj|j|dg�|jt|jd|d�tj|j|g�}||d<|jttj|j|dg�|jt|jd|d�dS(Nii(R	RRt
OverflowErrorRt(RtlowertupperR(((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pytcheck_overflow�s
#
#cCst|j}dtjfd��Y}||jddddgd�}|j|dd�|jtt|d	d
�dS(NtExaggeratingArraycBs,eZdgZd�Zd�Zd�ZRS(toffsetcSstjj|||�S(N(R	R�(R�RR�R�((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyR��scSs
||_dS(N(R�(RRR�R�((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyR
�scSstjj||�|jS(N(R	RqR�(RR�((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyRq�s(RRt	__slots__R�R
Rq(((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyR��s			iiiiiiR�R�(RR	R RtAttributeErrortsetattr(RRR�R(((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyttest_subclassing�s
	!(RRR�R�R�R�R�R�(((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyR�us					tSignedNumberTestcBsVeZdddddgZdddddgZdddddgZdZd�ZRS(	i����iii*ii~i+icCsntj|j�}dttd|jdd��}ttd|jdd��d}|j||�dS(Ni����iiil(R	RR0tpowR&R�(RR(R�R�((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyt
test_overflow�s$$(RRR*RcRdR�R�(((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyR��s
tUnsignedNumberTestcBs�eZddddddgZddddddgZddddddgZdZd	�Zejd
��Z	ejd��Z
RS(iiiii*i�i�i+i�cCsLtj|j�}d}ttd|jd��d}|j||�dS(Niiil(R	RR0R�R&R�(RR(R�R�((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyR��s cCsYtj|j|j�}tjd�}|j�d|j}tj||||�dS(Nt4Pi(R	RR*RtcalcvobjsizeR,R&tcheck_sizeof(RR(tbasesizetbuffer_size((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyttest_sizeof_with_buffer�scCs8tj|j�}tjd�}tj|||�dS(NR�(R	RRR�R�(RR(R�((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyttest_sizeof_without_buffer�s(RRR*RcRdR�R�Rtcpython_onlyR�R�(((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyR��s	tByteTestcBseZdZdZRS(R5i(RRRR'(((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyR��stUnsignedByteTestcBseZdZdZRS(R�i(RRRR'(((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyR��st	ShortTestcBseZdZdZRS(thi(RRRR'(((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyR�stUnsignedShortTestcBseZdZdZRS(tHi(RRRR'(((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyR�stIntTestcBseZdZdZRS(R�i(RRRR'(((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyR�stUnsignedIntTestcBseZdZdZRS(tIi(RRRR'(((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyR�stLongTestcBseZdZdZRS(R�i(RRRR'(((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyR�stUnsignedLongTestcBseZdZdZRS(R�i(RRRR'(((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyR�stUnicodeTypecodeTestcBseZd�ZRS(cCsVxOtD]G}tjt|��}|j|j|�|jt|j�t�qWdS(N(R!R	R�RRR`R=R^(RRR(((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyttest_unicode_typecode#s
(RRR�(((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyR�!stFPTestcBs_eZdddddgZdddddgZdddddgZdZd�Zd	�ZRS(
gE�ii*gj�@g _��g _��g _�BicCs|j||�dS(N(tassertAlmostEqual(RRR((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyR 1scCs�tj|j|j�}|jt|jd�|jdkr�tj|j|j�}|j�|jdkr�|j||�n|j|j	�|j	��|j�|j||�ndS(Ni*iiii(iiii(
R	RR*RRR3R&RR4RX(RR(R5((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyR64s

(RRR*RcRdR�R R6(((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyR�+s	t	FloatTestcBseZdZdZRS(ROi(RRRR'(((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyR�Dst
DoubleTestcBseZdZdZd�ZRS(tdicCs�ddlm}tjddgd�}y||dd9}Wntk
rRnX|jd�tjddddg�}y||d	dWntk
r�nX|jd�dS(
Ni����(tmaxsizeR�iis6Array of size > maxsize created - MemoryError expectedg�II�
�@g���S�!	@i(R�R�R	tMemoryErrortfail(RR�R(R5((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyttest_alloc_overflowMs


(RRRR'R(((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyR�IscCs�ddl}tjt�|r�t|d�r�ddl}dgd}xAtt|��D]-}tjt�|j	�|j
�||<qZW|GHndS(Ni����tgettotalrefcounti(R�Rtrun_unittestttestsR�R�RtxrangeR#R�R(tverboseR�R�tcountsR�((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyt	test_main`s



t__main__R(.t__doc__R�R�R�RtweakrefRR	RFtcPickleRRRR�RRRR!thave_unicodetTestCaseRR)RR�R�R�R�R�R�R�R�R�R�R�R�R�R�RR�R�R�R�RRRRb(((sh/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_array.pyt<module>sl	

���%
	]