Uname: Linux web3.us.cloudlogin.co 5.10.226-xeon-hst #2 SMP Fri Sep 13 12:28:44 UTC 2024 x86_64
Software: Apache
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.210.96.117
Your Ip: 3.144.167.32
User: edustar (269686) | Group: tty (888)
Safe Mode: OFF
Disable Function:
NONE

name : test_array.pyc
�
?��cc@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__(((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyR
stArraySubclassWithKwargscBseZdd�ZRS(cCstjj||�dS(N(tarrayt__init__(tselfttypecodetnewarg((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyR
sN(RRtNoneR
(((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyRstcbBhHiIlLfdtutMiscTestcBs,eZd�Zejd��Zd�ZRS(cCs�|jttj�|jttjdd�|jttjd�|jttjd�|jttjd�|jttjd�|jttjd�dS(Ntspami*txxtitxs�(tassertRaisest	TypeErrorR	t
ValueError(R((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyttest_bad_constructorscCs\|jttjd�|jttjd�|jttjd�|jttjd�dS(Nuxxuuxu€(RRR	R(R((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyttest_unicode_constructor$scCs�tjd�}||(|jt|�d�|jt||�d�|jt|d�d�||7}|jt|�d�dS(NtBii(R	tassertEqualtlen(Rta((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyt
test_empty+s
(RRRRtrequires_unicodeRR(((s6/usr/local/python-2.7/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(R(Rtentry1tentry2((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pytassertEntryEqual@scCs"ttj|j�dtt�S(Ni(t	typecodestindexRR(R((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pytbadtypecodeCscCs^tj|j�}|j|j|j�|j|j|j�|jttj|jd�dS(N(	R	RRtassertGreaterEqualtitemsizetminitemsizeRRR(RR((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyttest_constructorGscCswtj|j�}|j|jd�|jt|�d�tj|j|j�}|jt|�t|j��dS(Nii(R	RtappendtexampleRR(RR((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyttest_lenMs
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_infotassertIsInstancettupleRRtinttlong(RRtbi((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyttest_buffer_infoUs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(RRtb((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyt
test_byteswap_s

cCscddl}tj|j|j�}|j|�}|jt|�t|��|j||�dS(Ni����(tcopyR	RR-R7tidR(RR:RR8((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyt	test_copyls
cCscddl}tj|j|j�}|j|�}|jt|�t|��|j||�dS(Ni����(R:R	RR-tdeepcopyR7R;R(RR:RR8((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyt
test_deepcopyss
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-RRR7R;RRRttype(RtprotocolRR8((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyttest_picklezs	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RRR7R;RRRR@(RRARR8((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyttest_pickle_for_empty_array�s	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-tinsertRRRRR(RR((s6/usr/local/python-2.7/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	cStringIOtStringIORtunlinktTESTFNtopentclosetfromfileRRR7tEOFErrortclosed(RRtfR8((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyttest_tofromfile�s2

"	
cCsltj|j�}ttjd�}z&|jt|j|t|j	��Wd|j
�tjtj�XdS(NRF(R	RRMRRLRtIOErrorRORR-RNRK(RRRR((s6/usr/local/python-2.7/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(NiRFRG(R	RR-RMRRLtwriteRNRORRR7RQRK(RRRRR8((s6/usr/local/python-2.7/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(RRR8((s6/usr/local/python-2.7/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)(RRR8((s6/usr/local/python-2.7/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((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyt	test_repr
s)cCs*tj|jd|j�}t|�dS(Ni(R	RR-tstr(RR((s6/usr/local/python-2.7/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(RRtaltab((s6/usr/local/python-2.7/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__(RRR8((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyttest_add9s&-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����iRk(
R	RR-RcRR'RRRlt__iadd__(RRR8((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyt	test_iaddFs% 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����Rk(R	RR-RRRt__mul__(RR((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyttest_mul[s"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����Rk(R	RR-RcRRRt__imul__(RRR8((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyt	test_imulvs(




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$RRRt__getitem__t
IndexError(RR((s6/usr/local/python-2.7/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$RRRt__setitem__RRu(RR((s6/usr/local/python-2.7/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-RRRRt__delitem__RRu(RR((s6/usr/local/python-2.7/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((s6/usr/local/python-2.7/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(RRtindiceststarttstoptstep((s6/usr/local/python-2.7/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__RRwtsliceR'(RRR8((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyt
test_setslice&s�
$
$
$
$
#




/
"""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-R|treverseR(RR}R~RR�RtLtdata((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyttest_extended_set_del_slice�s


"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-RR((s6/usr/local/python-2.7/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-RR((s6/usr/local/python-2.7/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-Rtpostexample2((s6/usr/local/python-2.7/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RRutpopR-RRRR$R(RR((s6/usr/local/python-2.7/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((s6/usr/local/python-2.7/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'(RRR8((s6/usr/local/python-2.7/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((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyt__iter__�s(RRR�(((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyR��scsst�dVdS(N(R�R(((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyRs((R	RtiterR-RRRR�(RRR8R�R((s6/usr/local/python-2.7/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�Rtl((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyttest_coveritertraverses

cCsYtj|j|j�}tj��t|�}WdQX|j|d|j�d�dS(Ni(R	RR-Rtcheck_py3k_warningstbufferRR[(RRR8((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyttest_buffers
cCs]tj|j|j�}t|�}|j|j�|j��d}|jtt	|�dS(N(
R	RR-RRR[RRtReferenceErrorR(Rtstp((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyttest_weakrefs
tgetrefcountstest needs sys.getrefcount()cCs�x,td�D]}tjdtd��}q
Wtjd�}x,td�D]}tjdtd��}qKW|j|tjd��dS(Ni
Ri@(R?R	tsysR�R(RtiR8trc((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyttest_bug_782369scCs:tj��(tjddt�tddd�WdQXdS(NtignoreRR8R
i(twarningstcatch_warningstfilterwarningstDeprecationWarningR(R((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyttest_subclass_with_kwargs(s
(0RRR$R'R+R.R5R9R<R>RBRCRERSRURWRZR]R`RbRjRmRoRqRsRvRxRzR{R�R�R�R�R�R�R�R�R�R�R�R�R�tunittestt
skipUnlessthasattrR�R�R�(((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyR!7sV						
	
					!				
				$	
					'	"	2		[												
			t
StringTestcBseZd�ZRS(cCsOtt|�j�tj|j|j�}|jt|jd|jd �dS(Nii(	tsuperR�RxR	RR-RRRw(RR((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyRx1s(RRRx(((s6/usr/local/python-2.7/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((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyR�@stbluecSs
||_dS(N(tcolor(RR�R�((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyR
CscSs#tjd|j�j��|(dS(NR�(R	R[tstrip(R((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyR�FscSsd|j�S(NsEditableString(%r)(R[(R((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyt__repr__Is(RRR�R
R�R�(((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyR�?s		s	test
ttestR�tredR�(R	R�RR[R�t__dict__tkeys(RR�R�((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyttest_subbclassing>s

	cCsKtj|j|j�}|jt|jtd��|jt|j�dS(NR(R	RR-RRtfromunicodetunicodet	tounicode(RR((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyttest_nounicodeUs(RRRR-RfRgR�R*R�RR R�(((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyR�6s	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(
NR8tfootasciiRs\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_(RRR�((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyttest_unicodefs "	(
RRRR�R-RfRgR�R*R�(((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyR�^s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((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyt
test_extslice�s52;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((s6/usr/local/python-2.7/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(RRR8R�tins((s6/usr/local/python-2.7/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?RR|Re(RRR8((s6/usr/local/python-2.7/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
OverflowErrorRw(RtlowertupperR((s6/usr/local/python-2.7/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�((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyR��scSs
||_dS(N(R�(RRR�R�((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyR
�scSstjj||�|jS(N(R	RtR�(RR�((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyRt�s(RRt	__slots__R�R
Rt(((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyR��s			iiiiiiR�R�(RR	R$RtAttributeErrortsetattr(RRR�R((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyttest_subclassing�s
	!(RRR�R�R�R�R�R�(((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyR�s					tSignedNumberTestcBsVeZdddddgZdddddgZdddddgZdZd�ZRS(	i����iii*ii~i+icCsntj|j�}dttd|jdd��}ttd|jdd��d}|j||�dS(Ni����iiil(R	RR3tpowR)R�(RRR�R�((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyt
test_overflow�s$$(RRR-RfRgR�R�(((s6/usr/local/python-2.7/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R3R�R)R�(RRR�R�((s6/usr/local/python-2.7/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(RRtbasesizetbuffer_size((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyttest_sizeof_with_buffer�scCs8tj|j�}tjd�}tj|||�dS(NR�(R	RRR�R�(RRR�((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyttest_sizeof_without_buffer�s(RRR-RfRgR�R�Rtcpython_onlyR�R�(((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyR��s	tByteTestcBseZdZdZRS(R8i(RRRR*(((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyR�stUnsignedByteTestcBseZdZdZRS(Ri(RRRR*(((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyR�st	ShortTestcBseZdZdZRS(thi(RRRR*(((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyR�stUnsignedShortTestcBseZdZdZRS(tHi(RRRR*(((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyR�stIntTestcBseZdZdZRS(R�i(RRRR*(((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyR�stUnsignedIntTestcBseZdZdZRS(tIi(RRRR*(((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyR�stLongTestcBseZdZdZRS(R�i(RRRR*(((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyR� stUnsignedLongTestcBseZdZdZRS(R�i(RRRR*(((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyR�%stUnicodeTypecodeTestcBseZd�ZRS(cCsVxOtD]G}tjt|��}|j|j|�|jt|j�t�qWdS(N(R%R	R�RRRcR@Ra(RRR((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyttest_unicode_typecode-s
(RRR�(((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyR�+stFPTestcBs_eZdddddgZdddddgZdddddgZdZd�Zd	�ZRS(
gE�ii*gj�@g _��g _��g _�BicCs|j||�dS(N(tassertAlmostEqual(RR"R#((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyR$;scCs�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-RRR6R)RR7R[(RRR8((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyR9>s

(RRR-RfRgR�R$R9(((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyR�5s	t	FloatTestcBseZdZdZRS(RRi(RRRR*(((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyR�Nst
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�RR	tMemoryErrortfail(RRRR8((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyttest_alloc_overflowWs


(RRRR*R(((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyR�SscCs�ddl}tjt�|r�t|d�r�ddl}dgd}xAtt|��D]-}tjt�|j	�|j
�||<qZW|GHndS(Ni����tgettotalrefcounti(R�Rtrun_unittestttestsR�R�RtxrangeRR�R(tverboseR�R�tcountsR�((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyt	test_mainjs



t__main__R(.t__doc__R�R�R�RtweakrefRR	RItcPickleRRRR�RRRR%thave_unicodetTestCaseRR,R!R�R�R�R�R�R�R�R�R�R�R�R�R�R�R R�R�R�R�RR
RRe(((s6/usr/local/python-2.7/lib/python2.7/test/test_array.pyt<module>sl	

���%
	]







	



© 2025 GrazzMean