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: 18.118.37.20
User: edustar (269686) | Group: tty (888)
Safe Mode: OFF
Disable Function:
NONE

name : audiotests.pyc
�
>��cc@s�ddlmZmZmZddlZddlZddlZddlZddlZddl	Z	de
fd��YZd�Zd�Z
d�Zd�Zd	dd
��YZdefd��YZd
efd��YZdS(i����(tfindfiletTESTFNtunlinkNtUnseekableIOcBseZd�Zd�ZRS(cCs
tj�dS(N(tiotUnsupportedOperation(tself((s6/usr/local/python-2.7/lib/python2.7/test/audiotests.pyttell
scOs
tj�dS(N(RR(Rtargstkwargs((s6/usr/local/python-2.7/lib/python2.7/test/audiotests.pytseek
s(t__name__t
__module__RR
(((s6/usr/local/python-2.7/lib/python2.7/test/audiotests.pyR	s	cCstj|jdd��S(Nt t(tbase64t	b16decodetreplace(ts((s6/usr/local/python-2.7/lib/python2.7/test/audiotests.pytfromhexscCs0tjd�}|j|�|j�|j�S(Nth(tarrayt
fromstringtbyteswapttostring(tdatata((s6/usr/local/python-2.7/lib/python2.7/test/audiotests.pyt	byteswap2s

cCsVt|�}|ddd�|ddd�<|ddd�|ddd�<t|�S(Nii(t	bytearraytbytes(Rtba((s6/usr/local/python-2.7/lib/python2.7/test/audiotests.pyt	byteswap3s  cCs0tjd�}|j|�|j�|j�S(Nti(RRRR(RR((s6/usr/local/python-2.7/lib/python2.7/test/audiotests.pyt	byteswap4s

t
AudioTestscBs)eZeZd�Zd�Zd�ZRS(cCsd|_|_dS(N(tNonetftfout(R((s6/usr/local/python-2.7/lib/python2.7/test/audiotests.pytsetUp)scCsL|jdk	r|jj�n|jdk	r>|jj�ntt�dS(N(R$R#tcloseR%RR(R((s6/usr/local/python-2.7/lib/python2.7/test/audiotests.pyttearDown,s
cCs�|j|j�|�|j|j�|�|j|j�|�|j|j�|�|j|j�|�|j|j�|�|j�}|j|||||||f�xFtt	j
d�D]1}	t	j||	�}
|jt	j|
�|�q�WdS(Ni(
tassertEqualtgetnchannelstgetsampwidthtgetframeratet
getnframestgetcomptypetgetcompnamet	getparamstrangetpickletHIGHEST_PROTOCOLtdumpstloads(RR$t	nchannelst	sampwidtht	frameratetnframestcomptypetcompnametparamstprototdump((s6/usr/local/python-2.7/lib/python2.7/test/audiotests.pytcheck_params3s	(RRtFalsetclose_fdR&R(R?(((s6/usr/local/python-2.7/lib/python2.7/test/audiotests.pyR"&s		tAudioWriteTestscBskeZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�ZRS(cCsf|jj|d�}|_|j|j�|j|j�|j|j�|j	|j
|j�|S(Ntwb(tmoduletopenR%tsetnchannelsR6tsetsampwidthR7tsetframerateR8tsetcomptypeR:R;(RttestfileR$((s6/usr/local/python-2.7/lib/python2.7/test/audiotests.pytcreate_fileGscCs�|jj|d�}z~|j|j�|j�|j|j�|j�|j|j�|j�|j|j	�|�|j|j
|�|�Wd|j�XdS(Ntrb(RDRER)R*R6R+R7R,R8R-t
readframesR'(RRJR9tframesR$((s6/usr/local/python-2.7/lib/python2.7/test/audiotests.pyt
check_fileOscCsn|jt�}|j|j�|j|j�|j||j|j|j	|j|j
|j�|j�dS(N(
RKRt
setnframesR9twriteframesRNR?R6R7R8R:R;R'(RR$((s6/usr/local/python-2.7/lib/python2.7/test/audiotests.pyttest_write_paramsZscCsV|jt�}|j|j�|j|j�|j�|jt|j|j�dS(N(RKRRPR9RQRNR'RO(RR$((s6/usr/local/python-2.7/lib/python2.7/test/audiotests.pyt
test_writebs

c	Cs�ttd��Q}|jd�|j|�}|j|jd�|j|j�|j�WdQXttd��9}|j	|j
d�d�|j||j|j�WdQXdS(NRCt
ababagalamagaiRLi
(RERtwriteRKRPR9RQRNR'R)treadRO(RRJR$((s6/usr/local/python-2.7/lib/python2.7/test/audiotests.pyttest_incompleted_writejs
c	Cs�ttd��w}|jd�|j|�}|j|j�|j|j}|j|j	| �|j|j	|�|j
�WdQXttd��9}|j|jd�d�|j
||j|j	�WdQXdS(NRCRTRLi
(RERRURKRPR9R6R7RQRNR'R)RVRO(RRJR$t	framesize((s6/usr/local/python-2.7/lib/python2.7/test/audiotests.pyttest_multiple_writesvs
c	Cs�ttd��Q}|jd�|j|�}|j|jd�|j|j�|j�WdQXttd��9}|j	|j
d�d�|j||j|j�WdQXdS(NRCRTiRLi
(RERRURKRPR9RQRNR'R)RVRO(RRJR$((s6/usr/local/python-2.7/lib/python2.7/test/audiotests.pyttest_overflowed_write�s
cCsn|jt�}|j|j�|j|j�|j�ttd�� }|j||j|j�WdQXdS(NRL(	RKRRPR9RQRNR'RRO(RR$RJ((s6/usr/local/python-2.7/lib/python2.7/test/audiotests.pyttest_unseekable_read�s
cCswttd��I}|j|�}|j|j�|j|j�|j�d|_	WdQX|j
t|j|j�dS(NRC(RRRKRPR9RQRNR'R#R%RO(RRJR$((s6/usr/local/python-2.7/lib/python2.7/test/audiotests.pyttest_unseekable_write�s
c	Cs�ttd���}|jd�|j|�}|j|jd�y|j|j�Wntk
rinXy|j	�Wntk
r�nXWdQXt
td��=}|j|jd�d�|j
||jd|j�WdQXdS(NRCRTiRLi
(RRRURKRPR9RQRNtIOErrorR'RER)RVRO(RRJR$((s6/usr/local/python-2.7/lib/python2.7/test/audiotests.pyt!test_unseekable_incompleted_write�s



c
Cs�ttd���}|jd�|j|�}|j|jd�y|j|j�Wntk
rinXy|j	�Wntk
r�nXWdQXt
td��R}|j|jd�d�|j
|j}|j||jd|j| �WdQXdS(NRCRTiRLi
(RRRURKRPR9RQRNR]R'RER)RVR6R7RO(RRJR$RX((s6/usr/local/python-2.7/lib/python2.7/test/audiotests.pyt test_unseekable_overflowed_write�s 



(
RRRKRORRRSRWRYRZR[R\R^R_(((s6/usr/local/python-2.7/lib/python2.7/test/audiotests.pyRBEs										
	tAudioTestsWithSourceFilecBsDeZed��Zd�Zd�Zd�Zd�Zd�ZRS(cCst|jdd�|_dS(Ntsubdirt	audiodata(Rtsndfilenametsndfilepath(tcls((s6/usr/local/python-2.7/lib/python2.7/test/audiotests.pyt
setUpClass�scCsQ|jj|j�}|_|j||j|j|j|j|j	|j
�dS(N(RDRERdR$R?R6R7R8tsndfilenframesR:R;(RR$((s6/usr/local/python-2.7/lib/python2.7/test/audiotests.pyttest_read_params�sc
Cs�t|jd��P}|jj|�}|_|j|j�|j�|j|j|j�WdQXtt	d��y}|jj|d�}|_
|j|j�|j|jj��|j�WdQX|j|j|j�|j�WdQXdS(NRLRC(
RERdRDR$tassertFalsetclosedR'R)RARR%tassertRaisestError(RRJR$R%((s6/usr/local/python-2.7/lib/python2.7/test/audiotests.pyt
test_close�s
cCs�|j|j}|jd| }|jd|d|!}|jj|j�}|_|j|jd�d�|j|j	�d�|j|jd�|�|j
�|j	�}|j|d�|j|jd�|�|j	�}|j|d�|j|jd�|�|j|�|j|jd�|�|j|�|j|jd�|�|j|jj
��|jd�WdQX|j|jj
��|j|j�d�WdQXdS(NiiiRi����i(R6R7RNRDRERdR$R)RMRtrewindtsetposRkRlR-(RRXtchunk1tchunk2R$tpos0tpos2((s6/usr/local/python-2.7/lib/python2.7/test/audiotests.pyt	test_read�s,


cCs|jj|j�}|_|jjtd�}|_|j|j��d}|j�}x:|dkr�|d7}|j	|j
|��||8}q`W|j�|jjtd�}|_|j�|j
|j�|j��|j
|j
|j��|j
|j���dS(NRCiiRL(RDRERdR$RR%t	setparamsR0R-RQRMR'RnR)(RR$R%R tn((s6/usr/local/python-2.7/lib/python2.7/test/audiotests.pyt	test_copy�s


c
Cs2ttd��B}|jd�t|jd��}|j|j��WdQXWdQXttd���}|j|jd�d�|jj|d�}z�|j|j�|j�|j|j	�|j
�|j|j�|j�|j|j
�|j�|j|j|j�|j�Wd|j�XWdQXdS(NRCRTRLi
(RERRURdRVR)RDR*R6R+R7R,R8R-RgRMR9RNR'(RRJR$((s6/usr/local/python-2.7/lib/python2.7/test/audiotests.pyttest_read_not_from_starts
#(	RRtclassmethodRfRhRmRtRwRx(((s6/usr/local/python-2.7/lib/python2.7/test/audiotests.pyR`�s				((ttest.test_supportRRRtunittestRRR2tsysRtfileRRRRR!R"RBR`(((s6/usr/local/python-2.7/lib/python2.7/test/audiotests.pyt<module>s				�
© 2025 GrazzMean