%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/local/lib/python2.7/test/
Upload File :
Create Path :
Current File : //usr/local/lib/python2.7/test/audiotests.pyc

ó
Nêáac@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((s+/usr/local/lib/python2.7/test/audiotests.pyttell
scOs
tj‚dS(N(RR(Rtargstkwargs((s+/usr/local/lib/python2.7/test/audiotests.pytseek
s(t__name__t
__module__RR
(((s+/usr/local/lib/python2.7/test/audiotests.pyR	s	cCstj|jddƒƒS(Nt t(tbase64t	b16decodetreplace(ts((s+/usr/local/lib/python2.7/test/audiotests.pytfromhexscCs0tjdƒ}|j|ƒ|jƒ|jƒS(Nth(tarrayt
fromstringtbyteswapttostring(tdatata((s+/usr/local/lib/python2.7/test/audiotests.pyt	byteswap2s

cCsVt|ƒ}|ddd…|ddd…<|ddd…|ddd…<t|ƒS(Nii(t	bytearraytbytes(Rtba((s+/usr/local/lib/python2.7/test/audiotests.pyt	byteswap3s  cCs0tjdƒ}|j|ƒ|jƒ|jƒS(Nti(RRRR(RR((s+/usr/local/lib/python2.7/test/audiotests.pyt	byteswap4s

t
AudioTestscBs)eZeZd„Zd„Zd„ZRS(cCsd|_|_dS(N(tNonetftfout(R((s+/usr/local/lib/python2.7/test/audiotests.pytsetUp)scCsL|jdk	r|jjƒn|jdk	r>|jjƒnttƒdS(N(R$R#tcloseR%RR(R((s+/usr/local/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((s+/usr/local/lib/python2.7/test/audiotests.pytcheck_params3s	(RRtFalsetclose_fdR&R(R?(((s+/usr/local/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$((s+/usr/local/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$((s+/usr/local/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$((s+/usr/local/lib/python2.7/test/audiotests.pyttest_write_paramsZscCsV|jtƒ}|j|jƒ|j|jƒ|jƒ|jt|j|jƒdS(N(RKRRPR9RQRNR'RO(RR$((s+/usr/local/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$((s+/usr/local/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((s+/usr/local/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$((s+/usr/local/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((s+/usr/local/lib/python2.7/test/audiotests.pyttest_unseekable_reads
cCswttdƒI}|j|ƒ}|j|jƒ|j|jƒ|jƒd|_	WdQX|j
t|j|jƒdS(NRC(RRRKRPR9RQRNR'R#R%RO(RRJR$((s+/usr/local/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$((s+/usr/local/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((s+/usr/local/lib/python2.7/test/audiotests.pyt test_unseekable_overflowed_writeµs 



(
RRRKRORRRSRWRYRZR[R\R^R_(((s+/usr/local/lib/python2.7/test/audiotests.pyRBEs										
	tAudioTestsWithSourceFilecBsDeZed„ƒZd„Zd„Zd„Zd„Zd„ZRS(cCst|jddƒ|_dS(Ntsubdirt	audiodata(Rtsndfilenametsndfilepath(tcls((s+/usr/local/lib/python2.7/test/audiotests.pyt
setUpClassËscCsQ|jj|jƒ}|_|j||j|j|j|j|j	|j
ƒdS(N(RDRERdR$R?R6R7R8tsndfilenframesR:R;(RR$((s+/usr/local/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%((s+/usr/local/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((s+/usr/local/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((s+/usr/local/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$((s+/usr/local/lib/python2.7/test/audiotests.pyttest_read_not_from_starts
#(	RRtclassmethodRfRhRmRtRwRx(((s+/usr/local/lib/python2.7/test/audiotests.pyR`És				((ttest.test_supportRRRtunittestRRR2tsysRtfileRRRRR!R"RBR`(((s+/usr/local/lib/python2.7/test/audiotests.pyt<module>s				„

Zerion Mini Shell 1.0