%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/test_io.pyc


Nac@sdZddlmZddlmZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlZddlmZmZddlmZddlmZddlmZddlZddlZddlZddlZyddlZWnek
rIeZnXyddl Z Wnek
rseZ nXe!Z"ej#Z$d	Z%d
Z&dfdYZ'd
e'ej(fdYZ)de'ej(fdYZ*de'fdYZ+de+ej(fdYZ,de+ej(fdYZ-de+fdYZ.de.ej(fdYZ/de.ej(fdYZ0de+fdYZ1de1ej(fd YZ2d!e1ej(fd"YZ3d#fd$YZ4d%e4ej5fd&YZ6d'e4ej5fd(YZ7d)fd*YZ8d+e8ej(fd,YZ9d-e8ej(fd.YZ:d/e	j;fd0YZ<d1e<fd2YZ=d3e<fd4YZ>d5fd6YZ?d7fd8YZ@d9e	j;e?fd:YZAd;eAe@fd<YZBd=eAfd>YZCd?e	j;e?fd@YZDdAeDe@fdBYZEdCeDfdDYZFdEe	j;fdFYZGdGeGfdHYZHdIeGfdJYZIdKeAeDfdLYZJdMeBeEeJe@fdNYZKdOeJfdPYZLdQejMfdRYZNejOeNjPdSe	j;fdTYZQdUe	j;fdVYZRdWeRfdXYZSdYeRfdZYZTd[e	j;fd\YZUd]eUfd^YZVd_eUfd`YZWdae	j;fdbYZXdceXfddYZYdeeXfdfYZZe	j[ej\dgkdhdie	j;fdjYZ]dke]fdlYZ^dme]fdnYZ_doZ`eadpkre`ndS(quUnit tests for the io module.i(tprint_function(tunicode_literalsN(tcycletcount(tdeque(tUserList(ttest_supportcOstt||S(N(t
memoryviewt	bytearray(tpostkw((s(/usr/local/lib/python2.7/test/test_io.pyt	byteslike9scCs,tjtddd}|jSWdQXdS(u(Get the default TextIOWrapper chunk sizeurtencodingulatin1N(tiotopent__file__t_CHUNK_SIZE(tf((s(/usr/local/lib/python2.7/test/test_io.pyt_default_chunk_size<stMockRawIOWithoutReadcBsneZdZddZdZdZdZdZdZdZ	dZ
d	Zdd
Z
RS(
umA RawIO implementation without read(), so as to exercise the default
    RawIO.read() which calls readinto().cCs.t||_g|_d|_d|_dS(Ni(tlistt_read_stackt_write_stackt_readst_extraneous_reads(tselft
read_stack((s(/usr/local/lib/python2.7/test/test_io.pyt__init__Fs		cCs |jjt|t|S(N(Rtappendtbytestlen(Rtb((s(/usr/local/lib/python2.7/test/test_io.pytwriteLscCstS(N(tTrue(R((s(/usr/local/lib/python2.7/test/test_io.pytwritablePscCsdS(Ni*((R((s(/usr/local/lib/python2.7/test/test_io.pytfilenoSscCstS(N(R!(R((s(/usr/local/lib/python2.7/test/test_io.pytreadableVscCstS(N(R!(R((s(/usr/local/lib/python2.7/test/test_io.pytseekableYscCsdS(Ni((RR	twhence((s(/usr/local/lib/python2.7/test/test_io.pytseek\scCsdS(Ni((R((s(/usr/local/lib/python2.7/test/test_io.pyttell_scCs|jd7_t|}y|jd}Wn!tk
rO|jd7_dSX|dkrj|jd=dSt|}t||kr|jd=|||*|S|| |(|||jd<|SdS(Nii(RRRt
IndexErrorRtNone(Rtbuftmax_lentdatatn((s(/usr/local/lib/python2.7/test/test_io.pytreadintobs$



cCs|S(N((RR	((s(/usr/local/lib/python2.7/test/test_io.pyttruncatews(N(t__name__t
__module__t__doc__RR R"R#R$R%R'R(R/R*R0(((s(/usr/local/lib/python2.7/test/test_io.pyRBs								tCMockRawIOWithoutReadcBseZRS((R1R2(((s(/usr/local/lib/python2.7/test/test_io.pyR4zstPyMockRawIOWithoutReadcBseZRS((R1R2(((s(/usr/local/lib/python2.7/test/test_io.pyR5}st	MockRawIOcBseZddZRS(cCsA|jd7_y|jjdSWn|jd7_dSXdS(Niit(RRtpopR(RR.((s(/usr/local/lib/python2.7/test/test_io.pytreadsN(R1R2R*R9(((s(/usr/local/lib/python2.7/test/test_io.pyR6st
CMockRawIOcBseZRS((R1R2(((s(/usr/local/lib/python2.7/test/test_io.pyR:stPyMockRawIOcBseZRS((R1R2(((s(/usr/local/lib/python2.7/test/test_io.pyR;stMisbehavedRawIOcBs8eZdZddZdZdZdZRS(cCstj||dS(Ni(R6R (RR((s(/usr/local/lib/python2.7/test/test_io.pyR scCstj||dS(Ni(R6R9(RR.((s(/usr/local/lib/python2.7/test/test_io.pyR9scCsdS(Ni((RR	R&((s(/usr/local/lib/python2.7/test/test_io.pyR'scCsdS(Ni8((R((s(/usr/local/lib/python2.7/test/test_io.pyR(scCstj||t|dS(Ni(R6R/R(RR+((s(/usr/local/lib/python2.7/test/test_io.pyR/sN(R1R2R R*R9R'R(R/(((s(/usr/local/lib/python2.7/test/test_io.pyR<s
			tCMisbehavedRawIOcBseZRS((R1R2(((s(/usr/local/lib/python2.7/test/test_io.pyR=stPyMisbehavedRawIOcBseZRS((R1R2(((s(/usr/local/lib/python2.7/test/test_io.pyR>stCloseFailureIOcBseZdZdZRS(icCs|jsd|_tndS(Ni(tclosedtIOError(R((s(/usr/local/lib/python2.7/test/test_io.pytcloses		(R1R2R@RB(((s(/usr/local/lib/python2.7/test/test_io.pyR?stCCloseFailureIOcBseZRS((R1R2(((s(/usr/local/lib/python2.7/test/test_io.pyRCstPyCloseFailureIOcBseZRS((R1R2(((s(/usr/local/lib/python2.7/test/test_io.pyRDst
MockFileIOcBs&eZdZddZdZRS(cCs#g|_tt|j|dS(N(tread_historytsuperRER(RR-((s(/usr/local/lib/python2.7/test/test_io.pyRs	cCsDtt|j|}|jj|dkr3dn	t||S(N(RGRER9RFRR*R(RR.tres((s(/usr/local/lib/python2.7/test/test_io.pyR9s(cCs,tt|j|}|jj||S(N(RGRER/RFR(RRRH((s(/usr/local/lib/python2.7/test/test_io.pyR/sN(R1R2RR*R9R/(((s(/usr/local/lib/python2.7/test/test_io.pyREs	tCMockFileIOcBseZRS((R1R2(((s(/usr/local/lib/python2.7/test/test_io.pyRIstPyMockFileIOcBseZRS((R1R2(((s(/usr/local/lib/python2.7/test/test_io.pyRJstMockNonBlockWriterIOcBsGeZdZdZdZdZdZdZdZRS(cCsg|_d|_dS(N(RR*t
_blocker_char(R((s(/usr/local/lib/python2.7/test/test_io.pyRs	cCs dj|j}g|j(|S(NR7(tjoinR(Rts((s(/usr/local/lib/python2.7/test/test_io.pytpop_writtens
cCs
||_dS(u'Block when a given char is encountered.N(RL(Rtchar((s(/usr/local/lib/python2.7/test/test_io.pytblock_onscCstS(N(R!(R((s(/usr/local/lib/python2.7/test/test_io.pyR$scCstS(N(R!(R((s(/usr/local/lib/python2.7/test/test_io.pyR%scCstS(N(R!(R((s(/usr/local/lib/python2.7/test/test_io.pyR"scCst|}d}|jryy|j|j}Wntk
rDqyX|dkri|jj|| |Sd|_dSn|jj|t|S(Nii(RRLtindext
ValueErrorRRR*R(RRR.((s(/usr/local/lib/python2.7/test/test_io.pyR s	
	(	R1R2RRORQR$R%R"R (((s(/usr/local/lib/python2.7/test/test_io.pyRKs						tCMockNonBlockWriterIOcBseZejZRS((R1R2R
tBlockingIOError(((s(/usr/local/lib/python2.7/test/test_io.pyRTstPyMockNonBlockWriterIOcBseZejZRS((R1R2tpyioRU(((s(/usr/local/lib/python2.7/test/test_io.pyRVstIOTestcBspeZdZdZdZedZd)ZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZ dZ!d Z"d!Z#d"Z$d#Z%d$Z&d%Z'd&Z(d'Z)d(Z*RS(*cCstjtjdS(N(tsupporttunlinktTESTFN(R((s(/usr/local/lib/python2.7/test/test_io.pytsetUpscCstjtjdS(N(RYRZR[(R((s(/usr/local/lib/python2.7/test/test_io.pyttearDownscCs|j|jdd|jd|j|jd|jd|j|jdd|j|jdd|j|jdd|j|jd|j|jddd|j|jdtd}|j|j|d	d|(|j|jdd|j|jdd|j|jddd
|j|jd
|j|jdd|j|jd
|jt|jddS(Nsblah.iisHello.iiis	 world


i	t*thii
igs	*********(tassertEqualR R0R(R'RtassertRaisest	TypeError(RRtbuffer((s(/usr/local/lib/python2.7/test/test_io.pyt	write_opss(

cCsG|jd}|j|dt|}|j|j|d|j|jdtd}|j|j|d|jt|d|j|d d|j|jdd|j|jdd|j|jd	d
|j|jtdd|j|jddd
|j|jdd|j|jdd
|j|jtd|j|jdd	d|j|jdd|j|jd|j	t
|jd|rC|jd|j|jd|jd
|j|jd|j|jd
ndS(Nithellos worlisd
iishello world
iR7txiitworldi
gsworld
(R9R`RR/ttobytesRRR'R(RaRb(RRtbufferedR-((s(/usr/local/lib/python2.7/test/test_io.pytread_ops#s6

iicCs|jst|js$t|j|j|j|j|j|j|j|j|jdd|j|j|jd|j|jdd|jd|j|j|jd|j|j|jd|j|jdd|jd|j|j|jd|jd|j|j|jd|j|jdd|jd|j|jdd|j|j|j	dddS(NtxxxiiiiiRf(
R$tAssertionErrorR"R`R'tLARGER(R R0R9(RR((s(/usr/local/lib/python2.7/test/test_io.pytlarge_file_opsBs##'#c	CsxRd	D]J}|jtj|-}|jt|j|jt|jWdQXqW|jtjd6}|jt|jd|jt|jdgWdQX|jtjd6}|jt|jd|jt|jdgWdQXdS(
Nuwuwburbtblahsblah
urublahublah
(uwuwb(	RRYR[RaRAR9treadlineR t
writelines(Rtmodetfp((s(/usr/local/lib/python2.7/test/test_io.pyttest_invalid_operationsSs
c	Csnd}|jt|j|d|jd}tj.tjdt|jt|j|dWdQXdS(Nufoobaruwuasciiuignore(RaRbRtencodetwarningstcatch_warningstsimplefiltertDeprecationWarning(Rtfn_with_NULtbytes_fn((s(/usr/local/lib/python2.7/test/test_io.pyttest_open_handles_NUL_chars`s
cCs|jtjdddV}|j|jt|j|jt|j|jt|j	|WdQX|jtjdddV}|j|jt|j|jt|j|jt|j
|WdQXdS(Nuwbt	bufferingiurb(RRYR[R`R$tFalseR"R!R%RdRj(RR((s(/usr/local/lib/python2.7/test/test_io.pyttest_raw_file_ioiscCs|jtjdV}|j|jt|j|jt|j|jt|j	|WdQX|jtjdY}|j|jt|j|jt|j|jt|j
|tWdQXdS(Nuwburb(RRYR[R`R$R~R"R!R%RdRj(RR((s(/usr/local/lib/python2.7/test/test_io.pyttest_buffered_file_iousc
Cs'|jtjd}|jdWdQX|jtjd}|j|jd|j|jdd|j|jdd|j|jd	d
|j|jd|j|jdd|jt|jd
WdQX|jtjd}|jt|jd
WdQXdS(Nuwbs"abc
def
xyzzy
foobar
another lineurbsabc
i
sdef
itxyiszzy
sfoobar
sanother lineg333333@ur(	RRYR[R R`RpR*RaRb(RR((s(/usr/local/lib/python2.7/test/test_io.pyt
test_readlinescCs9d|jfdY}|jttft|dS(NtRcBseZdZRS(cSsdS(N(R*(R((s(/usr/local/lib/python2.7/test/test_io.pyRps(R1R2Rp(((s(/usr/local/lib/python2.7/test/test_io.pyRs(tIOBaseRaRbt
StopIterationtnext(RR((s(/usr/local/lib/python2.7/test/test_io.pyttest_readline_nonsizeablescCs6d|jfdY}|jt|jddS(NRcBseZdZRS(cSsdS(N(R*(R((s(/usr/local/lib/python2.7/test/test_io.pyRs(R1R2R(((s(/usr/local/lib/python2.7/test/test_io.pyRsi(RRaRbt	readlines(RR((s(/usr/local/lib/python2.7/test/test_io.pyttest_next_nonsizeablescCsX|j}|j||j}|j|d|j|}|j|tdS(Nshello world
(tBytesIORdtgetvalueR`RjR!(RRR-((s(/usr/local/lib/python2.7/test/test_io.pyttest_raw_bytes_ios
cCstjd dks"tjdkr<tjdd|jn|jtjdd}|j|WdQX|jtjd}|j|WdQXdS(Niuwinudarwinu	largefileu-test requires %s bytes and a long time to runuw+bi(tsystplatformRYtrequiresRmRR[Rn(RR((s(/usr/local/lib/python2.7/test/test_io.pyttest_large_file_opss"cCsxdD]}d}|jtjd|}|jdWdQX|j|jtd}y-|jtjd|}ddWdQXWn$tk
r|j|jtqX|j	dqWdS(NiiiduwbRku 1 // 0 didn't raise an exception(iiid(
R*RRYR[R R`R@R!tZeroDivisionErrortfail(RtbufsizeR((s(/usr/local/lib/python2.7/test/test_io.pyttest_with_opens

c
Cs|jtjd}|jdWdQX|jtjddd}|j|jdWdQX|jtjd}|j|jdWdQX|jtjd}|j|jdWdQXdS(NuwbRkuabR}iiua(RRYR[R R`R(t
assertGreater(RR((s(/usr/local/lib/python2.7/test/test_io.pyttest_append_mode_tellscsgd|jffdYtjd}|jd~tj|jdddg|jtjd}|j|jdWdQXdS(	NtMyFileIOcs>eZfdZfdZfdZRS(csBjdyt|j}Wntk
r6nX|dS(Ni(RRGt__del__tAttributeError(RR(Rtrecord(s(/usr/local/lib/python2.7/test/test_io.pyRs

cs$jdt|jdS(Ni(RRGRB(R(RR(s(/usr/local/lib/python2.7/test/test_io.pyRBs
cs$jdt|jdS(Ni(RRGtflush(R(RR(s(/usr/local/lib/python2.7/test/test_io.pyRs
(R1R2RRBR((RR(s(/usr/local/lib/python2.7/test/test_io.pyRsuwbRkiiiurb(tFileIORYR[R t
gc_collectR`RR9(RR((RRs(/usr/local/lib/python2.7/test/test_io.pyttest_destructors"

csXgd|ffdY}~tj|jdddgdS(NtMyIOcsGeZdZfdZfdZfdZRS(cSsd|_d|_d|_dS(Niii(ton_delton_closeton_flush(R((s(/usr/local/lib/python2.7/test/test_io.pyRs		csEj|jyt|j}Wntk
r9nX|dS(N(RRRGRR(RR(RR(s(/usr/local/lib/python2.7/test/test_io.pyRs
cs'j|jt|jdS(N(RRRGRB(R(RR(s(/usr/local/lib/python2.7/test/test_io.pyRBscs'j|jt|jdS(N(RRRGR(R(RR(s(/usr/local/lib/python2.7/test/test_io.pyRs(R1R2RRRBR((RR(s(/usr/local/lib/python2.7/test/test_io.pyRs	iii(RYRR`(RtbaseR((RRs(/usr/local/lib/python2.7/test/test_io.pyt_check_base_destructors	
cCs|j|jdS(N(RR(R((s(/usr/local/lib/python2.7/test/test_io.pyttest_IOBase_destructorscCs|j|jdS(N(Rt	RawIOBase(R((s(/usr/local/lib/python2.7/test/test_io.pyttest_RawIOBase_destructorscCs|j|jdS(N(RtBufferedIOBase(R((s(/usr/local/lib/python2.7/test/test_io.pyttest_BufferedIOBase_destructorscCs|j|jdS(N(Rt
TextIOBase(R((s(/usr/local/lib/python2.7/test/test_io.pyttest_TextIOBase_destructorscCsc|jtjd}|jdWdQX|jtjd}|j|jdWdQXdS(NuwbRkurb(RRYR[R R`R9(RR((s(/usr/local/lib/python2.7/test/test_io.pyttest_close_flushesscCstjdtd}t|j}|jtjdd }|j|j||WdQX|jtjd }|j|j||WdQXdS(Ntii
uwbi(	tarraytrangeRttostringRRYR[R`R (RtaR.R((s(/usr/local/lib/python2.7/test/test_io.pyttest_array_writesscCs&|jt|jtjddtdS(Nuwtclosefd(RaRSRRYR[R~(R((s(/usr/local/lib/python2.7/test/test_io.pyttest_closefdsc
Cs|jtjd}|jdWdQX|jtjde}|j|jddt}|j|jd|jd|j	|j
t|jWdQXdS(Nuwuegg
urRi(RRYR[R R#R~R`R9R'RBRaRS(RRtfile((s(/usr/local/lib/python2.7/test/test_io.pyttest_read_closed#s

cCs&|jt|jtjddtdS(NurR(RaRSRRYR[R~(R((s(/usr/local/lib/python2.7/test/test_io.pyttest_no_closefd_with_filename-sc
Cs|jtjd}|jdWdQX|jtjdW}|j|jjjt|j|j	ddt
}|j|jjjt
WdQXdS(Nuwbsegg
urR(RRYR[R R`RctrawRR!R#R~(RRR((s(/usr/local/lib/python2.7/test/test_io.pyttest_closefd_attr1scCs|jtjd}|jd||_tj|}~tj|j|||j	tjd}|j
|jdWdQXdS(Nuwbtabcxxxurb(RRYR[R RtweakreftrefRtassertIsNoneRR`R9(RRtwr((s(/usr/local/lib/python2.7/test/test_io.pyttest_garbage_collection9s
	
c	Csd}tjj|s1|jdj|ntjdkrP|jdntjtj	krr|jdn|j
|ddd}|jt|j
WdQX|j
|d}|jt|j
WdQX|j
|d	}|jt|j
WdQXdS(
Nu	/dev/zerou{0} does not existiu+test can only run in a 32-bit address spaceu$test requires at least 2GB of memoryurbR}iur(tostpathtexiststskipTesttformatRtmaxsizeRYtreal_max_memuset_2GRRat
OverflowErrorR9(RtzeroR((s(/usr/local/lib/python2.7/test/test_io.pyttest_unbounded_fileFscs|j||gfd}|_|jtj|jj|j|jdd_dS(Ncsjg(tdS(N(R@RA((R@R(s(/usr/local/lib/python2.7/test/test_io.pyt	bad_flush[s
icSsdS(N(R*(((s(/usr/local/lib/python2.7/test/test_io.pyt<lambda>cR7(RRRaRARBt
assertTrueR@tassertFalse(RtargstkwargsR((R@Rs(/usr/local/lib/python2.7/test/test_io.pytcheck_flush_error_on_closeVs	
cCs|jtjdddtjtjtjtjB}|j|dddtjtjtjtjB}|j|ddddttj||jtjdtjtjtjtjB}|j|dtjtjtjtjB}|j|ddttj||jtjdtjtjtjtjB}|j|dtjtjtjtjB}|j|ddttj|dS(NuwbR}iRuw(	RRYR[RRtO_WRONLYtO_CREATR~RB(Rtfd((s(/usr/local/lib/python2.7/test/test_io.pyttest_flush_error_on_closees$

cCsP|jtjddd}|j|j|j|jt|jdS(NuwbR}i(RRYR[RBRaRSR(RR((s(/usr/local/lib/python2.7/test/test_io.pyttest_multi_close}s



cCs|jd
}|j|jdd|j|jdd|j|jdd|j|jdd|j|jdd|j|jdd|j|jdd|j|jdd	dS(NtabctdtefgitabtcteftgR7(RRNRN(RR*R`R9(Rtrawio((s(/usr/local/lib/python2.7/test/test_io.pyttest_RawIOBase_readscCs|jtdt}|jtdY}|j|jdt}|j|jdt|j|j|jWdQXWdQXdS(NurbR(RRRR#R~RRpRB(Rtf1tf2tfileio((s(/usr/local/lib/python2.7/test/test_io.pyttest_fileio_closefds

c
Cshtjdt@}|jt|jtjdddWdQXtjWdQX|j	|gdS(NRuwR}i(
RvRwR!RaRSRRYR[RR`(Rtrecorded((s(/usr/local/lib/python2.7/test/test_io.pyttest_nonbuffered_textios
c
Cshtjdt@}|jt|jtjdddWdQXtjWdQX|j	|gdS(NRuwtnewlineuinvalid(
RvRwR!RaRSRRYR[RR`(RR((s(/usr/local/lib/python2.7/test/test_io.pyttest_invalid_newlines
cCsad|jfdY}|}td}|j|j|d|j|jddS(NtStreamcBseZdZRS(cSsdS(Nt12345((Rtsize((s(/usr/local/lib/python2.7/test/test_io.pyR9s(R1R2R9(((s(/usr/local/lib/python2.7/test/test_io.pyRsiR(RRR`R/Rh(RRtstreamRc((s(/usr/local/lib/python2.7/test/test_io.pyttest_buffered_readinto_mixins
	cCs9d|jfdY}|}|jt|jdS(NRcBseZdZdZRS(cSsdS(N((Rtnametvalue((s(/usr/local/lib/python2.7/test/test_io.pyt__setattr__scSs
tdS(N(tOSError(R((s(/usr/local/lib/python2.7/test/test_io.pyRs(R1R2RR(((s(/usr/local/lib/python2.7/test/test_io.pyRs	(RRaRRB(RRR((s(/usr/local/lib/python2.7/test/test_io.pyttest_close_asserts	I(+R1R2R\R]RdR~RjRmRnRtR|RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR(((s(/usr/local/lib/python2.7/test/test_io.pyRXsP					
									
		
										
			
					
				
tCIOTestcBseZdZRS(cCshd|jfdY}||}||_tj|}~~tj|j||dS(NRcBseZdZRS(cSsdS(N((R((s(/usr/local/lib/python2.7/test/test_io.pyRBs(R1R2RB(((s(/usr/local/lib/python2.7/test/test_io.pyRs(RtobjRRRYRR(RRRR((s(/usr/local/lib/python2.7/test/test_io.pyttest_IOBase_finalizes		
(R1R2R(((s(/usr/local/lib/python2.7/test/test_io.pyRstPyIOTestcBs eZejdejZRS(uBlen(array.array) returns number of elements rather than bytelength(R1R2tunittesttskipRXR(((s(/usr/local/lib/python2.7/test/test_io.pyRstCommonBufferedTestscBskeZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZRS(cCsR|j}|j|}|j|j||jt|jt|dS(N(R6ttptassertIstdetachRaRStrepr(RRR+((s(/usr/local/lib/python2.7/test/test_io.pyttest_detachs
cCs5|j}|j|}|jd|jdS(Ni*(R6RR`R#(RRtbufio((s(/usr/local/lib/python2.7/test/test_io.pyttest_filenoscCsQ|j}|j|}|jt|jdd|jt|jdddS(Niii(R6RRaRSR'(RRR((s(/usr/local/lib/python2.7/test/test_io.pyttest_invalid_argsscs|j}gd|ffdY|j}|}|j}~tj|r|jdddgn|jddgdS(NtMyBufferedIOcs>eZfdZfdZfdZRS(csBjdyt|j}Wntk
r6nX|dS(Ni(RRGRR(RR(RR(s(/usr/local/lib/python2.7/test/test_io.pyRs

cs$jdt|jdS(Ni(RRGRB(R(RR(s(/usr/local/lib/python2.7/test/test_io.pyRBs
cs$jdt|jdS(Ni(RRGR(R(RR(s(/usr/local/lib/python2.7/test/test_io.pyRs
(R1R2RRBR((RR(s(/usr/local/lib/python2.7/test/test_io.pyRsiii(RR6R"RYRR`(RRRRR"((RRs(/usr/local/lib/python2.7/test/test_io.pyttest_override_destructors	
csE|j}|j|fd}||jt|dS(NcsWdQXdS(N(((R(s(/usr/local/lib/python2.7/test/test_io.pyt_withs(R6RRaRS(RRR((Rs(/usr/local/lib/python2.7/test/test_io.pyttest_context_managers
csjfd}tjd}jt|WdQX|jj}|rjt|j	dj
|jd|j
|jd|ndS(NcsjjdS(N(Rtxyzzy((RR(s(/usr/local/lib/python2.7/test/test_io.pyRsustderriuException IOError: u ignored(
R?RYtcaptured_outputRaRRtstripR`Rt
splitlinesRt
startswithtendswith(RRRN((RRs(/usr/local/lib/python2.7/test/test_io.pyttest_error_through_destructorscCs|j}|j|}d|jj|jjf}|jt|d|d|_|jt|d|d|_|jt|d|dS(Nu%s.%su<%s>udummyu<%s name=u'dummy'>tdummyu<%s name='dummy'>(R6RR2R1R`RR(RRRtclsname((s(/usr/local/lib/python2.7/test/test_io.pyt	test_repr)s		cs|jgfd}|_|j|jtj|jj|jj|j|jd|jdd_dS(Ncs jjg(tdS(N(R@RA((RR@R(s(/usr/local/lib/python2.7/test/test_io.pyR8siicSsdS(N(R*(((s(/usr/local/lib/python2.7/test/test_io.pyRCR7(	R6RRRaRARBRR@R(RR((RR@Rs(/usr/local/lib/python2.7/test/test_io.pyR3s	
cCs|j}d}d}||_|j|}||_|jt}|jWdQX|j|jjd|j	|j
dS(NcSstddS(Nuflush(RA(((s(/usr/local/lib/python2.7/test/test_io.pyRGscSstddS(Nuclose(RA(((s(/usr/local/lib/python2.7/test/test_io.pyt	bad_closeIsuclose(uclose(R6RBRRRaRAR`t	exceptionRRR@(RRRRRterr((s(/usr/local/lib/python2.7/test/test_io.pyttest_close_error_on_closeEs				cCsP|j}|j|}|j|j|j|jt|jdS(N(R6RRBRaRSR(RRR((s(/usr/local/lib/python2.7/test/test_io.pyRSs


cCsP|j}|j|}|j}|jttf||_WdQXdS(N(R6RRaRRbR(RRR+Rf((s(/usr/local/lib/python2.7/test/test_io.pyttest_readonly_attributes[s
(
R1R2RRRRRRRRRRR(((s(/usr/local/lib/python2.7/test/test_io.pyRs							
			t
SizeofTestcBseZejdZRS(cCsd}d}|j}|j|d|}tj||}|j}|j|d|}|jtj|||dS(Nii tbuffer_size(R6RRt	getsizeofR`(Rtbufsize1tbufsize2RRR((s(/usr/local/lib/python2.7/test/test_io.pyttest_sizeofes(R1R2RYtcpython_onlyR(((s(/usr/local/lib/python2.7/test/test_io.pyRcstBufferedReaderTestcBseZdZdZdZdZdZdZdZdZ	dZ
d	Zd
Ze
jedejdd
ZdZdZRS(urbcCs|jdg}|j|}|j||j|dd|j|dd|jd|j|jt|j|dd|jt|j|dd|jt|j|dd|jdg}|j||jd|jdS(NRRiiiii(R6RRR`R9RaRS(RRR((s(/usr/local/lib/python2.7/test/test_io.pyttest_constructorts

cCs||jj|j}~|jj|j}|jttfd|jd|j|j|j|jdddS(Nuuninitialized|has no attributeiR7(	Rt__new__tassertRaisesRegexpRSRR9RR6R`(RR((s(/usr/local/lib/python2.7/test/test_io.pyttest_uninitializeds
cCsbxEdD]=}|jd}|j|}|jd|j|qW|jt|jddS(	NiRRRtabcdefgi(Ni(RRR(R*R6RR`R9RaRS(RtargRR((s(/usr/local/lib/python2.7/test/test_io.pyt	test_reads

cCs-|jd}|j|}|jd|jd|jd|jd|j|jd|jd|jd|j|jd|jd|jd|j|jd	|jd|jd|j|jd
|jd|jd|j|jd|jt|jd
dS(NRRRRiRRidiiR7ii(RRR(R6RR`R9tread1RRaRS(RRR((s(/usr/local/lib/python2.7/test/test_io.pyt
test_read1scCs|jd}|j|}td}|j|j|d|j|d|j|j|d|j|d|j|j|d|j|d|j|j|d|j|d	|j|j|d
|j|d	dS(NRRRiRtcdRitgfi(RRR(R6RRR`R/(RRRR((s(/usr/local/lib/python2.7/test/test_io.pyt
test_readintoscs|fd}j|jdddgj|jdddgj|jddddgdS(Ncsjd}j|S(Nsabc
sd
R(sabc
sd
R(R6R(R(R(s(/usr/local/lib/python2.7/test/test_io.pyRssabc
sd
Ri(R`RR*(RR((Rs(/usr/local/lib/python2.7/test/test_io.pyttest_readliness""cCs	d}t|}dddddg|dggddddg|ggdddddgdddggg}x|D]\}}}|j|}|j|d	|}d}	x<|D]4}
|j|j|
||	|	|
!|	|
7}	qW|j|j|qvWdS(
Nt	abcdefghiidiiiiiiR(RRERR`R9RF(RR-tdlenttestsRtbuf_read_sizestraw_read_sizesRRR	tnbytes((s(/usr/local/lib/python2.7/test/test_io.pyttest_bufferings'
$cCs|jd}|j|}|jd|jd|jd|jd|jd|j|jd	|jd|j|j|jd	|j|jd}|jd
|j|j|jdS(
NRRRtabcditeitfgR7R(RRNRNNN(RNN(R6R*RR`R9tpeekRtreadall(RRR((s(/usr/local/lib/python2.7/test/test_io.pyttest_read_non_blockingscCs;|jd}|j|}|jd|jddS(NRRRR i(#(RRR(R6RR`R9(RRR((s(/usr/local/lib/python2.7/test/test_io.pyttest_read_past_eofscCs8|jd}|j|}|jd|jdS(NRRRR (RRR(R6RR`R9(RRR((s(/usr/local/lib/python2.7/test/test_io.pyt
test_read_allsu!Threading required for this test.ucpuc
szzd}ttd|}tj|tt|}|jtjd}|j	|WdQX|jtj|j
dd}|j|dggfd}gtdD]}tj
d	|^q}tj|tjd
WdQX|jddj}xBtdD]4}tt|g}	|j|j|	|q;WWdQXWdtjtjXdS(
NiiuwbR}iicsqyGx@tddgD],}j|}|s5Pnj|qWWn#tk
rl}j|nXdS(Nii(RR9Rt	Exception(R.RNR1(Rterrorstresults(s(/usr/local/lib/python2.7/test/test_io.pyRs
ittargetg{Gz?u(the following exceptions were caught: %rR7(RRtrandomtshuffleRRRRYR[R t	read_modeRt	threadingtThreadt
start_threadsttimetsleepRRMR`RRZ(
RtNtlRNRRRftthreadsRR((RR9R:s(/usr/local/lib/python2.7/test/test_io.pyttest_threadss,
!+	'cCsK|jd}|j|}|jt|jd|jt|jdS(NRRRi(RRR(R<RRaRAR'R((RRR((s(/usr/local/lib/python2.7/test/test_io.pyttest_misbehaved_ioscCsd}xd|d||d|dfD]}|jd|g}|j||}|j|j|d||j|jddj||j|jd|ddg}|j||}|j|j|d||j|jddj||jq(WdS(NiiiRfiufailed for {}: {} != 0(R6RR`R9RR(RRR.RR((s(/usr/local/lib/python2.7/test/test_io.pyttest_no_extraneous_reads((R1R2R>RRR"R$R'R(R/R5R6R7Rt
skipUnlessR?RYtrequires_resourceRGRHRI(((s(/usr/local/lib/python2.7/test/test_io.pyRqs		
								(	tCBufferedReaderTestcBs>eZejZdZdZdZdZdZ	RS(cCsctj|tjdkr_|j}|j|}|jttt	f|j
|tjndS(Ni(RRRRR6RRaRtMemoryErrorRSR(RRR((s(/usr/local/lib/python2.7/test/test_io.pyR2s
cCs|jdg}|j|}|jt|j|dd|jt|j|jt|j|dd|jt|j|jt|j|dd|jt|jdS(NRRiii(R6RRaRSRR9(RRR((s(/usr/local/lib/python2.7/test/test_io.pyttest_initialization<scCs8|jd}|j|}|jt|jddS(NRRRi
(RRR(R<RRaRAR9(RRR((s(/usr/local/lib/python2.7/test/test_io.pyttest_misbehaved_io_readFscCsv|jtjtj|jtjd}|j|}||_tj|}~tj	|j
||dS(Nuw+b(t
addCleanupRYRZR[RRRRRRR(RRRR((s(/usr/local/lib/python2.7/test/test_io.pyRMs	
c	Cs9|jtd!|jtjdddWdQXdS(NuBufferedReaderi(RRbRR
R(R((s(/usr/local/lib/python2.7/test/test_io.pyttest_args_errorYs(
R1R2R
tBufferedReaderRRRNRORRQ(((s(/usr/local/lib/python2.7/test/test_io.pyRL/s		
	
		tPyBufferedReaderTestcBseZejZRS((R1R2RWRRR(((s(/usr/local/lib/python2.7/test/test_io.pyRS_stBufferedWriterTestcBseZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZdZdZdZejedejddZdZdZdZRS(uwbcCs|j}|j|}|j||j|dd|j|dd|jd|jd|j|jt|j|dd|jt|j|dd|jt|j|dd|j||jd|jd	|j|jd
j|j	ddS(NRiiiRiiitghiR7tabcghi(
R6RRR`R RRaRSRMR(RRR((s(/usr/local/lib/python2.7/test/test_io.pyRfs



cCs||jj|j}~|jj|j}|jttfd|jd|j|j|j|jdddS(Nuuninitialized|has no attributeR7i(	RRRRSRR RR6R`(RR((s(/usr/local/lib/python2.7/test/test_io.pyRvs
cCs\|j}|j|}|jd|j|j|j|j|jdgdS(Nshowdy!(R6RR RRRR`(RRR+((s(/usr/local/lib/python2.7/test/test_io.pyttest_detach_flushs

cCs|j}|j|d}|jd|j|jtd}|j|d|(|j|jdj|jddS(NiRtdefs***R7tabcdef(	R6RR RRRRR`RM(RtwriterRRc((s(/usr/local/lib/python2.7/test/test_io.pyt
test_writes


cCs|j}|j|d}d}x8tdt|dD]}|j|||d!q=Wdj|j}|j|j|d |dS(NitabcdefghijklmnopiiR7i(	R6RRRR RMRRR	(RRZRtcontentsR.tflushed((s(/usr/local/lib/python2.7/test/test_io.pyttest_write_overflowsc	Csttdd}d}|j}|j|d}d}|}xm|t|krtt|t||}|j|j||||!|||||7}qOW|j	|j|dj
|jdS(Niiii
css7x0tdD]"}xtdD]}|Vq Wq
WdS(Nii(RR(RR((s(/usr/local/lib/python2.7/test/test_io.pyt	gen_sizessR7(RRR6RRtminRR`R RRMR(	Rtintermediate_funcR]R.RZRR`tsizesR((s(/usr/local/lib/python2.7/test/test_io.pytcheck_writess		$

	cCs|jddS(NcSsdS(N(R*(R((s(/usr/local/lib/python2.7/test/test_io.pyRR7(Rd(R((s(/usr/local/lib/python2.7/test/test_io.pyttest_writesscCs|jddS(NcSs
|jS(N(R(R((s(/usr/local/lib/python2.7/test/test_io.pyRR7(Rd(R((s(/usr/local/lib/python2.7/test/test_io.pyttest_writes_and_flushesscCs0d}|j|d}|j|dS(NcSsH|j}|j|dd|j|dd|j|ddS(Nii(R(R'(RR	((s(/usr/local/lib/python2.7/test/test_io.pyt_seekabsscSsG|jdd}|jd
d|jdd|j|ddS(Niii(R'(RR	((s(/usr/local/lib/python2.7/test/test_io.pyt_seekrels(Rd(RRgRh((s(/usr/local/lib/python2.7/test/test_io.pyttest_writes_and_seekss	
	cCs|jddS(NcSs|j|jS(N(R0R((R((s(/usr/local/lib/python2.7/test/test_io.pyRR7(Rd(R((s(/usr/local/lib/python2.7/test/test_io.pyttest_writes_and_truncatesscCs+|j}|j|d}|j|jdd|j|jdd|jd|j|jdd|jdy|jd	Wn|jk
r}|j}nX|jd
|j|d|j|jd|j|jd
d|j}|j	|j
d|dS(NiR0itefghiitktjklmnt0topqrwxyz0123456789u'BlockingIOError should have been raiseditabcdefghijklmnopqrwxyzt	ABCDEFGHIi	t	01234567A(RKRR`R RQRUtcharacters_writtenRRORR	(RRRR1twrittenRN((s(/usr/local/lib/python2.7/test/test_io.pyttest_write_non_blockings$



cCstj}|j|d}|j|jdd|j|jd|jdd|j|jdd|jdd|j|jd|j|jdd|j|j|jd	dS(
NiRYiitXYitXYcdeft123456tXYcdef123456(	R
RRR`R R(R'RR(RRR((s(/usr/local/lib/python2.7/test/test_io.pyttest_write_and_rewinds
cCsP|j}|j|d}|jd|j|jd|jddS(NiRi(R6RR RR`R(RRZR((s(/usr/local/lib/python2.7/test/test_io.pyt
test_flushs


cCsddddg}|j}|j|d}|j||j|jdj|jddS(NRR%RiR7RY(R6RRqRR`RMR(RRERZR((s(/usr/local/lib/python2.7/test/test_io.pyttest_writeliness

cCsjtdddg}|j}|j|d}|j||j|jdj|jddS(NRR%RiR7RY(RR6RRqRR`RMR(RRERZR((s(/usr/local/lib/python2.7/test/test_io.pyttest_writelines_userlists

cCsW|j}|j|d}|jt|jdddg|jt|jddS(Niiii(R6RRaRbRqR*(RRZR((s(/usr/local/lib/python2.7/test/test_io.pyttest_writelines_error
scCsS|j}|j|d}|jd~tj|jd|jddS(NiRi(R6RR RYRR`R(RRZR((s(/usr/local/lib/python2.7/test/test_io.pyRs

cCs|jtjtj|jtj|jddU}|j|d}|jd|j|j	dd|j|j
dWdQX|jtjddd}|j|jdWdQXdS(	NR}iiRYiiurbR(RPRYRZR[Rt
write_modeRR R`R0R(R9(RRRR((s(/usr/local/lib/python2.7/test/test_io.pyt
test_truncates!
u!Threading required for this test.ucpuc
szd}ttd|}tddg}d}txD|t|krt|}j||||!||7}qCW~|jtj	|j
dd}|j|dgfd}gtd	D]}tj
d
|^q}	tj|	tjdWdQX|jdjWdQX|jtj	d
}|j}
WdQXx6tdD](}|j|
jt|g|qWWdtjtj	XdS(NiiiiiR}icsmyCx<trAyj}Wntk
r0dSXj|qWWn#tk
rh}j|nXdS(N(R!tpopleftR)R R8R(RNR1(RR9tqueue(s(/usr/local/lib/python2.7/test/test_io.pyR;s	

iR;g{Gz?u(the following exceptions were caught: %rurb(RRRRRRRRRYR[RRR?R@RARBRCRRBR9R`RRZ(RRDR]RcR.RRRRfRFRNR((RR9Rs(/usr/local/lib/python2.7/test/test_io.pyRG#s4	!+	*cCsa|j}|j|d}|jt|jd|jt|j|jt|jddS(NiiRY(R<RRaRAR'R(R (RRR((s(/usr/local/lib/python2.7/test/test_io.pyRHSs
cCs9tjdtf|j|jddWdQXdS(Numax_buffer_size is deprecatedii(RYtcheck_warningsRyRR6(R((s(/usr/local/lib/python2.7/test/test_io.pyt test_max_buffer_size_deprecationZs	
cCsa|j}d}||_|j|}|jd|jt|j|j|jdS(NcSs
tdS(N(RA(R((s(/usr/local/lib/python2.7/test/test_io.pyt	bad_writeastspam(R6R RRaRARBRR@(RRRR((s(/usr/local/lib/python2.7/test/test_io.pyttest_write_error_on_close_s		
(R1R2RRRRWR[R_RdReRfRiRjRuRzR{R|R}R~RRRRJR?RYRKRGRHRR(((s(/usr/local/lib/python2.7/test/test_io.pyRTcs0		
										
						/		tCBufferedWriterTestcBs5eZejZdZdZdZdZRS(cCsctj|tjdkr_|j}|j|}|jttt	f|j
|tjndS(Ni(RTRRRR6RRaRRMRSR(RRR((s(/usr/local/lib/python2.7/test/test_io.pyRms
cCs|j}|j|}|jt|j|dd|jt|jd|jt|j|dd|jt|jd|jt|j|dd|jt|jddS(NRiRXii(R6RRaRSRR (RRR((s(/usr/local/lib/python2.7/test/test_io.pyRNwscCs|jtjtj|jtjd}|j|}|jd||_tj	|}~tj
|j|||jtjd}|j
|jdWdQXdS(Nuw+bt123xxxurb(RPRYRZR[RRR RfRRRRRR`R9(RRRR((s(/usr/local/lib/python2.7/test/test_io.pyRs
	
c	Cs9|jtd!|jtjdddWdQXdS(NuBufferedWriteri(RRbRR
R(R((s(/usr/local/lib/python2.7/test/test_io.pyRQs(	R1R2R
tBufferedWriterRRRNRRQ(((s(/usr/local/lib/python2.7/test/test_io.pyRjs
		
	
	tPyBufferedWriterTestcBseZejZRS((R1R2RWRR(((s(/usr/local/lib/python2.7/test/test_io.pyRstBufferedRWPairTestcBseZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZdZdZdZdZdZRS(cCs2|j|j|j}|j|jdS(N(RR6RR@(Rtpair((s(/usr/local/lib/python2.7/test/test_io.pyRscCs|jj|j}~|jj|j}|jttfd|jd|jttfd|jd|j|j|j|j	|jdd|j	|jdddS(Nuuninitialized|has no attributeiR7(
RRRRSRR9R RR6R`(RR((s(/usr/local/lib/python2.7/test/test_io.pyRs

cCs8|j|j|j}|j|j|jdS(N(RR6RatUnsupportedOperationR(RR((s(/usr/local/lib/python2.7/test/test_io.pyRsc	CsBtjdtf'|j|j|jddWdQXdS(Numax_buffer_size is deprecatedii(RYRRyRR6(R((s(/usr/local/lib/python2.7/test/test_io.pyt,test_constructor_max_buffer_size_deprecations	
cCs<dtfdY}|jt|j||jdS(NtNotReadablecBseZdZRS(cSstS(N(R~(R((s(/usr/local/lib/python2.7/test/test_io.pyR$s(R1R2R$(((s(/usr/local/lib/python2.7/test/test_io.pyRs(R6RaRAR(RR((s(/usr/local/lib/python2.7/test/test_io.pyt"test_constructor_with_not_readablescCs<dtfdY}|jt|j|j|dS(NtNotWriteablecBseZdZRS(cSstS(N(R~(R((s(/usr/local/lib/python2.7/test/test_io.pyR"s(R1R2R"(((s(/usr/local/lib/python2.7/test/test_io.pyRs(R6RaRAR(RR((s(/usr/local/lib/python2.7/test/test_io.pyt#test_constructor_with_not_writeablescCs|j|jd|j}|j|jdd|j|jdd|j|jd|j|jd|j}|j|jdddS(NRYiRiRR(RRR6R`R9R*(RR((s(/usr/local/lib/python2.7/test/test_io.pyR"s!!csyfd}j|jdddgj|jdddgj|jdddgdS(NcsjjdjS(Ns	abc
def
h(RRR6((R(s(/usr/local/lib/python2.7/test/test_io.pyRR7sabc
sdef
R_i(R`R(RR((Rs(/usr/local/lib/python2.7/test/test_io.pyR(s""cCs>|j|jd|j}|j|jdddS(NRYiR(RRR6R`R#(RR((s(/usr/local/lib/python2.7/test/test_io.pyR$s!cCs`|j|jd|j}td}|j|j|d|j|jddS(NRYitabcde(RRR6RR`R/Rh(RRR-((s(/usr/local/lib/python2.7/test/test_io.pyR's!cCs|j}|j|j|}|jd|jtd}|j|d|(|j|j|jddgdS(NRRXs***(R6RR RRR`R(RtwRRc((s(/usr/local/lib/python2.7/test/test_io.pyR[s



cCs]|j|jd|j}|j|jdjd|j|jdddS(NRYiR(RRR6RR3R	R`R9(RR((s(/usr/local/lib/python2.7/test/test_io.pyt	test_peeks!cCs5|j|j|j}|j|jdS(N(RR6RR$(RR((s(/usr/local/lib/python2.7/test/test_io.pyt
test_readablescCs5|j|j|j}|j|jdS(N(RR6RR"(RR((s(/usr/local/lib/python2.7/test/test_io.pyttest_writeablescCs5|j|j|j}|j|jdS(N(RR6RR%(RR((s(/usr/local/lib/python2.7/test/test_io.pyt
test_seekablescCsL|j|j|j}|j|j|j|j|jdS(N(RR6RR@RBR(RR((s(/usr/local/lib/python2.7/test/test_io.pyttest_close_and_closeds
cCsd}|j}||_|j}|j||}|jt}|jWdQX|jdt|j|j|j	|j
|j	|j|j	dS(NcSstdS(N(treader_non_existing(((s(/usr/local/lib/python2.7/test/test_io.pytreader_closesureader_non_existing(R6RBRRat	NameErrortassertIntstrRRR@R(RRtreaderRZRR((s(/usr/local/lib/python2.7/test/test_io.pyt test_reader_close_error_on_closes		cCsd}|j}|j}||_|j||}|jt}|jWdQX|jdt|j|j|j	|j
|j	|j|j	dS(NcSstdS(N(twriter_non_existing(((s(/usr/local/lib/python2.7/test/test_io.pytwriter_closesuwriter_non_existing(R6RBRRaRRRRRR@R(RRRRZRR((s(/usr/local/lib/python2.7/test/test_io.pyt test_writer_close_error_on_closes		cCsd}d}|j}||_|j}||_|j||}|jt}|jWdQX|jdt|j|j|j	|j|j	|j|j	dS(NcSstdS(N(R(((s(/usr/local/lib/python2.7/test/test_io.pyR(scSstdS(N(R(((s(/usr/local/lib/python2.7/test/test_io.pyR*sureader_non_existing(
R6RBRRaRRRRRR@(RRRRRZRR((s(/usr/local/lib/python2.7/test/test_io.pyt'test_reader_writer_close_error_on_close's				cCsdtfdY}|j|t|t}|j|j|j|t|t}|j|j|j|t|t}|j|j|j|t|t}|j|jdS(NtSelectableIsAttycBseZdZdZRS(cSstj|||_dS(N(R6Rt_isatty(Rtisatty((s(/usr/local/lib/python2.7/test/test_io.pyR:s
cSs|jS(N(R(R((s(/usr/local/lib/python2.7/test/test_io.pyR>s(R1R2RR(((s(/usr/local/lib/python2.7/test/test_io.pyR9s	(R6RR~RRR!R(RRR((s(/usr/local/lib/python2.7/test/test_io.pyttest_isatty8scCs=|j|j|j}tj|}d}d}dS(N(RR6RRR*(RtbrwR((s(/usr/local/lib/python2.7/test/test_io.pyttest_weakref_clearingMs(R1R2RRRRRRR"R(R$R'R[RRRRRRRRRR(((s(/usr/local/lib/python2.7/test/test_io.pyRs*																						tCBufferedRWPairTestcBseZejZRS((R1R2R
tBufferedRWPairR(((s(/usr/local/lib/python2.7/test/test_io.pyRSstPyBufferedRWPairTestcBseZejZRS((R1R2RWRR(((s(/usr/local/lib/python2.7/test/test_io.pyRVstBufferedRandomTestcBseZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZdZdZdZdZdZdZRS(urb+uwb+cCstj|tj|dS(N(RRRT(R((s(/usr/local/lib/python2.7/test/test_io.pyR^s
cCstj|tj|dS(N(RRRT(R((s(/usr/local/lib/python2.7/test/test_io.pyRbs
cCs|jd
}|j|d}|jd|jd|jd|jd|j|j|jd|j|jd|jd	dS(Ntasdftghjkitasitdddteeetdddeeei(RR(R6RR`R9R RR(RRtrw((s(/usr/local/lib/python2.7/test/test_io.pyttest_read_and_writefs

cCs^|jd}|j|}|jd|jd|jd|j|jdd|jd|jd|jd|jdd|jd|j|jd	|j|jd
d|jd|j|jdd|jd
|j|jd|jd|j|jd|j|j	t
|jddS(Nt	asdfghjklRiiRit123ft	asdf123fli	iiiitflig(RRR`R9R(R'R RRRaRb(RRR((s(/usr/local/lib/python2.7/test/test_io.pyttest_seek_and_tellqs$

cCs|jd}|j|}|jd||d|jd|jd||d|jd|j|j|jd|j|jd|||jdd|jd	|j|jdd|jd	||d
dS(NR)Rit12RiRUitXYZi(RRR`R R(RR'(Rt	read_funcRR((s(/usr/local/lib/python2.7/test/test_io.pytcheck_flush_and_reads



cCs|jddS(NcWs
|j|S(N(R9(RR((s(/usr/local/lib/python2.7/test/test_io.pyRR7(R(R((s(/usr/local/lib/python2.7/test/test_io.pyttest_flush_and_readscCsdd}|j|dS(NicSs;t|dkr|nd}|j|}t|| S(Nii'(RR/R(RR.R((s(/usr/local/lib/python2.7/test/test_io.pyt	_readintos(R(RR((s(/usr/local/lib/python2.7/test/test_io.pyttest_flush_and_readintoscCsdd}|j|dS(NicSsB|j|}|dkr(|| }n|jt|d|S(Nii(R3R'R(RR.R((s(/usr/local/lib/python2.7/test/test_io.pyt_peeks

(R(RR((s(/usr/local/lib/python2.7/test/test_io.pyttest_flush_and_peekscCs|jd}|j|}|jd|j|jd|j|jdd|jd|j|jd|jdS(NR)t123t45it	12345fghi(RRR RR'R`RR9(RRR((s(/usr/local/lib/python2.7/test/test_io.pyttest_flush_and_writes



cCstj|tj|dS(N(RRGRT(R((s(/usr/local/lib/python2.7/test/test_io.pyRGs
cCs0d}|j|d}|j|dS(NcSs|jddS(Ni(R3(R((s(/usr/local/lib/python2.7/test/test_io.pyRscSs=|j}|jdd|jd|j|ddS(Niii(R(R'R3(RR	((s(/usr/local/lib/python2.7/test/test_io.pyRs
(Rd(RR((s(/usr/local/lib/python2.7/test/test_io.pyttest_writes_and_peeks	
	cCsd}|j|dS(NcSs!|jdd|jddS(Nii(R'R9(R((s(/usr/local/lib/python2.7/test/test_io.pyt_reads(Rd(RR((s(/usr/local/lib/python2.7/test/test_io.pyttest_writes_and_readss	cCsd}|j|dS(NcSs!|jdd|jddS(Nii(R'R#(R((s(/usr/local/lib/python2.7/test/test_io.pyt_read1s(Rd(RR((s(/usr/local/lib/python2.7/test/test_io.pyttest_writes_and_read1ss	cCsd}|j|dS(NcSs'|jdd|jtddS(Nii(R'R/R(R((s(/usr/local/lib/python2.7/test/test_io.pyRs(Rd(RR((s(/usr/local/lib/python2.7/test/test_io.pyttest_writes_and_readintoss	cCsxddgD]}|jd}|j|d}|j|jdd|j|jd|jd||j|j|d|j|j|j|d|j}|j|dd|dd|q
WdS(	NiitAi
itBi	t
AAAAAAAAAA(RRR`R9R(R RR(Rtoverwrite_sizeRRRN((s(/usr/local/lib/python2.7/test/test_io.pyttest_write_after_readaheads
	cCsd}d}xtdt|D]}xt|t|D]}|j|}|j|d}|||||jt|}d||<d||<|j|j|d||fqAWq%WdS(NcSs[||kst|j||j|||jd|j||jddS(Nss(RlR'R9R (Rtpos1tpos2((s(/usr/local/lib/python2.7/test/test_io.pytmutates


siidiiufailed result for i=%d, j=%d(RRRRRRR`R(RRRRtjRRtexpected((s(/usr/local/lib/python2.7/test/test_io.pyttest_write_rewind_writes	


cCs|jd}|j|d}|j|jdd|j|jd|j|jdd|j|jddS(	NRi
iditAAtBBiR(RRR`R9R0R (RRR((s(/usr/local/lib/python2.7/test/test_io.pyt!test_truncate_after_read_or_write
scCstj|tj|dS(N(RRHRT(R((s(/usr/local/lib/python2.7/test/test_io.pyRHs
c
Cs|jd}|j|d}|jd|j|jdd|jd|j|jdd|jdtd}|j||j|d	|jd
|j|jdd|j	|j|j
dWdQXWdQX|jd
}|j|df}|j|jdd|jd|j|jdd|j	|j|j
dWdQXWdQXdS(Ntabcdefghidt1iRt2Rt3Rt4R_t1b2d3f4hRRRta2c(RRR R`R9R#RR/R3RR(RRRR+((s(/usr/local/lib/python2.7/test/test_io.pyttest_interleaved_read_writes*





"

cCs|jd}|j|}|jd|j|jd|jd|j|jd|jd|j|jd|j|j|jdWdQXWdQXdS(	Ns
ab
cdef
g
Rsb
Rsdef
Rs
s
1b
2def
3
(RRR R`RpRR(RRR((s(/usr/local/lib/python2.7/test/test_io.pyttest_interleaved_readline_write/s



(R1R2R>RRRRRRRRRRRGRRRRRRRRHRR(((s(/usr/local/lib/python2.7/test/test_io.pyRZs,																			tCBufferedRandomTestcBs,eZejZdZdZdZRS(cCsctj|tjdkr_|j}|j|}|jttt	f|j
|tjndS(Ni(RRRRR6RRaRRMRSR(RRR((s(/usr/local/lib/python2.7/test/test_io.pyR@s
cCstj|tj|dS(N(RLRR(R((s(/usr/local/lib/python2.7/test/test_io.pyRJs
c	Cs9|jtd!|jtjdddWdQXdS(NuBufferedRandomi(RRbRR
R(R((s(/usr/local/lib/python2.7/test/test_io.pyRQNs(R1R2R
tBufferedRandomRRRRQ(((s(/usr/local/lib/python2.7/test/test_io.pyR<s		
	tPyBufferedRandomTestcBseZejZRS((R1R2RWRR(((s(/usr/local/lib/python2.7/test/test_io.pyRTstStatefulIncrementalDecodercBsheZdZddZdZdZdZdZedZ	dZ
eZed	Z
RS(
u
    For testing seek/tell behavior with a stateful, buffering decoder.

    Input is a sequence of words.  Words may be fixed-length (length set
    by input) or variable-length (period-terminated).  In variable-length
    mode, extra periods are ignored.  Possible words are:
      - 'i' followed by a number sets the input length, I (maximum 99).
        When I is set to 0, words are space-terminated.
      - 'o' followed by a number sets the output length, O (maximum 99).
      - Any other word is converted into a word followed by a period on
        the output.  The output word consists of the input word truncated
        or padded out with hyphens to make its length equal to O.  If O
        is 0, the word is output verbatim without truncating or padding.
    I and O are initially set to 1.  When I changes, any buffered input is
    re-scanned according to the new I.  EOF also terminates the last word.
    ustrictcCs!tjj|||jdS(N(tcodecstIncrementalDecoderRtreset(RR9((s(/usr/local/lib/python2.7/test/test_io.pyRuscCsdt|S(Nu<SID %x>(tid(R((s(/usr/local/lib/python2.7/test/test_io.pyt__repr__yscCs"d|_d|_t|_dS(Ni(RtoRRc(R((s(/usr/local/lib/python2.7/test/test_io.pyR|s		cCs6|jdA|jdA}}t|j|d|fS(Niid(RRRRc(RRR((s(/usr/local/lib/python2.7/test/test_io.pytgetstatescCsO|\}}t||_t|d\}}|dA|dA|_|_dS(Nidi(RRctdivmodRR(RtstateRcR
RR((s(/usr/local/lib/python2.7/test/test_io.pytsetstatescCsd}x|D]}|jdkr`|dkrM|jr]||j7}q]q|jj|q
|jj|t|j|jkr
||j7}q
q
W|r|jr||j7}n|S(Nuiu.(RRctprocess_wordRR(RtinputtfinaltoutputR((s(/usr/local/lib/python2.7/test/test_io.pytdecodes
	cCsd}|jdtdkrGtdt|jdp8d|_n|jdtdkrtdt|jdpyd|_n^|jjd}t||jkr|d|j7}n|jr||j }n|d	7}t|_|S(
Nuiuiiciuouasciiu-u.(	RctordRatintRRRRR(RR((s(/usr/local/lib/python2.7/test/test_io.pyRs((	
cCs_|jr[|dkr[tjd}tjddd|jddddddddd	|SdS(
Nutest_decoderulatin-1RRuRtincrementalencodertstreamreadertstreamwritertincrementaldecoder(tcodecEnabledRtlookupt	CodecInfoRuR*(tclsRtlatin1((s(/usr/local/lib/python2.7/test/test_io.pytlookupTestDecoders	(R1R2R3RRRRRR~RRRtclassmethodR(((s(/usr/local/lib/python2.7/test/test_io.pyRcs					tStatefulIncrementalDecoderTestc
BseZdZdedfdedfdedfdedfded	fd
edfded
dddddddddfgZdZRS(uB
    Make sure the StatefulIncrementalDecoder actually works.
    R0ua.b.c.d.toiabcduabcd.soi...abcd...si.o6.x.xyz.toolongtofit.ux-----.xyz---.toolon.s
i.i2.o6xyzuxy----.z-----.si.o3.i6.abcdefghijklmnopuabc.ghi.mno.s;i.o29.a.b.cde.o15.abcdefghijabcdefghij.i3.a.b.c.d.ei00k.l.mua----------------------------.ub----------------------------.ucde--------------------------.uabcdefghijabcde.ua.b------------.u.c.------------.ud.e------------.uk--------------.ul--------------.um--------------.cCsx?|jD]4\}}}t}|j|j|||q
Wt}|j|jdd|j|jddddS(NRuR7iuabcd.(t
test_casesRR`R(RRteofRR((s(/usr/local/lib/python2.7/test/test_io.pyttest_decoders	 	(R1R2R3R~R!R	R(((s(/usr/local/lib/python2.7/test/test_io.pyRs	#
tTextIOWrapperTestcBseZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZ dZ!d Z"d!Z#d"Z$d#Z%d$Z&d%Z'd&Z(d'Z)e*j+e,d(d)Z-d*Z.d+Z/d,Z0d-Z1d.Z2d/Z3d0Z4RS(1cCs/d|_djd|_tjtjdS(NsAAA
BBB
CCC
DDD
EEE
sAAA
BBB
CCC
DDD
EEE
uascii(ttestdataRt
normalizedRYRZR[(R((s(/usr/local/lib/python2.7/test/test_io.pyR\s	cCstjtjdS(N(RYRZR[(R((s(/usr/local/lib/python2.7/test/test_io.pyR]scCs|jd}|j|d}|j|}|j|dddd|j|jd|j|jt|j|dddt|j|jd|j|jt|jd	|j	|j
t|j|dd
|j
t|j|dddS(Nsé

iRulatin1Ru
uutf8tline_bufferingué
i*uxyzzy(
RRRt
TextIOWrapperRR`RRR~R!RpRaRbRS(RtrRtt((s(/usr/local/lib/python2.7/test/test_io.pyRscCs|jj|j}~|jj|j}|jtt||jttfd|jd|j	|j
|j|jdddS(Nuuninitialized|has no attributeiu(RRRaR8RRRSRR9RR6R`(RR((s(/usr/local/lib/python2.7/test/test_io.pyRs
cCsE|j}|j|}tj|j|ddWdQXdS(NRu	hex_codec(RRRYtcheck_py3k_warningsR(RRR((s(/usr/local/lib/python2.7/test/test_io.pyt*test_non_text_encoding_codecs_are_rejecteds
cCs|j}|j|}|j|}|j|j||j|dd}|jd|j|j|j|j|jd|j	t
|jt||j|jd|j|j
d|j|jdS(NRuasciiuhowdythowdyustrict(RRRRRR RRR`RaRSRRR9R(RRRR((s(/usr/local/lib/python2.7/test/test_io.pyRs


cCs|jdjd}|j|}|j|dd}|jj}|jt|d|d|_|jt|d|d|_|jt|d||jj	t|dS(	Nuhellouutf-8Ru#<%s.TextIOWrapper encoding='utf-8'>udummyu1<%s.TextIOWrapper name=u'dummy' encoding='utf-8'>Ru0<%s.TextIOWrapper name='dummy' encoding='utf-8'>(
RRuRRRR2R`RRRcR(RRRRtmodname((s(/usr/local/lib/python2.7/test/test_io.pyR's		
cCs|j}|j|d}|j|dddt}|jd|j|jd|jd|j|jd|jd	|j|jd
dS(NiRu
RuXR7uY
ZsXY
ZuA
BsXY
ZA
B(RRRR!R R`R(RRRR((s(/usr/local/lib/python2.7/test/test_io.pyttest_line_buffering8s


cCsg|j}|j|dd}|j|jd|j|}|j|jtj|jdS(NRuutf8(RRR`RtassertIsNotNoneRR(RRR((s(/usr/local/lib/python2.7/test/test_io.pyt
test_encodingCscCs|jd}|j|dd}|jt|j|jd}|j|dddd}|jt|j|jd}|j|dddd}|j|jd|jd}|j|dddd}|j|jd	dS(
Nsabc

RuasciiR9ustrictuignoreuabc

ureplaceuabc
�
(RRRatUnicodeErrorR9R`(RRR((s(/usr/local/lib/python2.7/test/test_io.pyttest_encoding_errors_readingLscCs,|j}|j|dd}|jt|jd|j}|j|dddd}|jt|jd|j}|j|dddddd}|jd	|j|j|jd
|j}|j|dddddd}|jd	|j|j|jddS(
NRuasciiuÿR9ustrictuignoreRu
u	abcÿdef
sabcdef
ureplacesabc?def
(RRRaRR RR`R(RRR((s(/usr/local/lib/python2.7/test/test_io.pyttest_encoding_errors_writing^s$	

	

c
Csdddddg}ddddddggd|gd	ddd
dggddd
ggddddggg}d}xj|D]b}tdj|j|}x;ttfD]-}x$tddD]}x
|D]\}}	|j|j||}
|j	|
d|d|}|r}g}xetry|j
d}
|
dkrIPn|jt|
d|j
|
|jq$Wnt|}x-t||	D]\}}|j||qW|jt|t|	qWqWqWqWdS( Nuunix
u	windows
uos9
ulast
unonluwindows
uos9
uu
u	os9
last
u
uunix
windows
u
os9
last
nonlu
u
unix
windows
u
os9
u	last
nonluutf-8ulatin-1uutf-16u	utf-16-leu	utf-16-beuutf-32u	utf-32-leu	utf-32-beii
RRi(uutf-8ulatin-1uutf-16u	utf-16-leu	utf-16-beuutf-32u	utf-32-leu	utf-32-be(R*RRMRuR~R!RRRRRR9R`RRRpRtzip(Rtinput_linesR+t	encodingsRR-tdo_readsRRt	exp_linesRttextiot	got_linestc2tgot_linetexp_line((s(/usr/local/lib/python2.7/test/test_io.pyt
test_newlinesvs:	
		c
Cs#d}|jddjdd}xd|jdjtfd|jdjtfddd	d
ddgfd
dddgfddddddgfgD]x\}}|j|}|j|ddd|}|j|j||j	d|j|j
dj|qWdS(NsAAA
BBB
CCC
DDD
EEE
FFF
GGGs
s
s
uasciiuu
uAAA
uBBB
u
CCC
DDD
EEE
uFFF
uGGGu
uAAA
BBB
CCC
DDD
EEE
u
u
AAA
BBB
CCC
uDDD
uEEE
u
FFF
u
GGGRRi(treplaceR*RRR!RRR`RR'R9RM(RR
RRRR+ttxt((s(/usr/local/lib/python2.7/test/test_io.pyttest_newlines_inputs(
cCsidd6dd6dd6dd6}d|tjfgt|j}x|D]\}}|j}|j|dd	d
|}|jd|jd|jd
|j|j	|j
t|j	|j|qOWdS(NsAAA
BBB
CCC
X
Y
Zuu
sAAA
BBB
CCC
X
Y

Zu
sAAA
BBB
CCC
X
Y

Zu
RuasciiRuAAA
BuBB
CCC
uX
Y
Z(
R*RtlineseptsortedtitemsRRR RR`R@R~R(RttestdictR+RRR+R)((s(/usr/local/lib/python2.7/test/test_io.pyttest_newlines_outputs
&



cs}g|jdffdY}|}|j|dd}|jd~tj|jdgdS(Nt	MyBytesIOcseZfdZRS(cs$j|jj|dS(N(RRRB(R(RRE(s(/usr/local/lib/python2.7/test/test_io.pyRBs(R1R2RB((RRE(s(/usr/local/lib/python2.7/test/test_io.pyR0sRuasciiuabcR(RRR RYRR`(RR0RR((RREs(/usr/local/lib/python2.7/test/test_io.pyRs		

cspgd|jffdY|j}|dd}~tj|jdddgdS(NtMyTextIOcs>eZfdZfdZfdZRS(csBjdyt|j}Wntk
r6nX|dS(Ni(RRGRR(RR(R1R(s(/usr/local/lib/python2.7/test/test_io.pyRs

cs$jdt|jdS(Ni(RRGRB(R(R1R(s(/usr/local/lib/python2.7/test/test_io.pyRBs
cs$jdt|jdS(Ni(RRGR(R(R1R(s(/usr/local/lib/python2.7/test/test_io.pyRs
(R1R2RRBR((R1R(s(/usr/local/lib/python2.7/test/test_io.pyR1sRuasciiiii(RRRYRR`(RRR((R1Rs(/usr/local/lib/python2.7/test/test_io.pyRs"
csjfd}tjd}jt|WdQX|jj}|rjt|j	dj
|jd|j
|jd|ndS(NcsjjdS(N(RR((RR(s(/usr/local/lib/python2.7/test/test_io.pyRsustderriuException IOError: u ignored(
R?RYRRaRRRR`RRRR	R
(RRRN((RRs(/usr/local/lib/python2.7/test/test_io.pyRscCs(x!dD]}xdD]}|jtjdd|}||_|j|jdd|j|jtjdd|}||_|j|jd|j|jd|j}|j|j	dd|j|jdd|j	d|j|jdd|j|jdd|j|jdd|j|jd|j|j||j|j	dd|j|j	dd||j|jdd|j|j	|||j|jd|jdr|j||n|jqWqWdS(Niiiiiiiiii i!i?i@iAuasciiulatin1uutf8uw+Ruabcur+iuabucuudefuutf(iiiiiiiiii i!i?i@iA(uasciiulatin1uutf8(
RRYR[RR`R RBR(R9R'R*R	tmulti_line_test(Rt	chunksizetencRtcookie((s(/usr/local/lib/python2.7/test/test_io.pyt
test_basic_ios6

	
	
cCs|jd|jd}g}xdD]w}g}x/t|D]!}|j||t|qCWdj|d}|j|j|f|j|q*W|jdg}	x?tr|j}
|j	}|sPn|	j|
|fqW|j
|	|dS(Niu	sÿ࿿￿iiiiiiii i!i>i?i@iAiuu
(iiiiiiiii i!i>i?i@iAi(R'R0RRRRMR(R R!RpR`(RRR4tsampletwlinesRtcharsRtlinetrlinesR	((s(/usr/local/lib/python2.7/test/test_io.pyR2	s(



	cCs9|jtjddd}|j}|jd|j}|jd|j}|jd|j|j||j|jd|j|j||j|jd|j|j||jdx1|D])}|j|d|jt	|jqW|j|j||j
dS(Nuw+Ruutf8uÿ
i(RRYR[R(R R'R`RpRaRARB(RRtp0tp1tp2R:((s(/usr/local/lib/python2.7/test/test_io.pyttest_telling+	s$




c
Cst}|d}d|}t|jd}|jt|t|d}t|jd}||}|jtjd}|j|d|j	|jtjddd}|j
|}	|j|	|jd|j|j||j|j
|dS(	Niuauutf-8u袈
uwburRuascii(RRRuR`RRRYR[R RBR9RR(Rp(
Rt
chunk_sizetprefix_sizetu_prefixtprefixtu_suffixtsuffixR:RRN((s(/usr/local/lib/python2.7/test/test_io.pyttest_seeking?	s 	



cCsud}|jtjd}|j||j|jtjddd}|jd|_|j|jdS(Ns࿿
uwburRuutf-8i(RRYR[R RBRRpR((RR-R((s(/usr/local/lib/python2.7/test/test_io.pyttest_seeking_tooQ	s

	
csddfd}dt_zx$tjD]\}}}||q1WxStjD]H\}}}t|d}d|}|d}||||qXWWddt_XdS(NiicsEjtjd}|j||jjtjdd}|_|j}|jxt|t|dD]}xddt||gD]}jtjdd}j	|j||| |j
}j	|j|||||!|j|j	|j|||jqWq}WdS(uTell/seek to various points within a data stream and ensure
            that the decoded data returned by read() is consistent.uwbRutest_decoderiiN(RRYR[R RBRR9RRR`R(R'(R-tmin_posRtdecodedRRR5(t
CHUNK_SIZER(s(/usr/local/lib/python2.7/test/test_io.pyttest_seek_and_tell_with_datab	s 

	
  $
iit.(RRRR	R(RRKRt_toffsetRCRH((RJRs(/usr/local/lib/python2.7/test/test_io.pyR]	s	

cCsd}d}x|D]}|j}|j|d|}|j||j||jd	|j|j|d
|jd	|j|j|d
|j|j|d
j|qWdS(Nu
1234567890uutf-16u	utf-16-leu	utf-16-beuutf-32u	utf-32-leu	utf-32-beRii(uutf-16u	utf-16-leu	utf-16-beuutf-32u	utf-32-leu	utf-32-be(RRR R'R`R9RRu(RR-R+RR+R((s(/usr/local/lib/python2.7/test/test_io.pyttest_encoded_writes	s"




cCsBd|jfdY}|j|}|jt|jdS(Nt
UnReadablecBseZdZRS(cSstS(N(R~(R((s(/usr/local/lib/python2.7/test/test_io.pyR$	s(R1R2R$(((s(/usr/local/lib/python2.7/test/test_io.pyRP	s(RRRaRAR9(RRPR)((s(/usr/local/lib/python2.7/test/test_io.pyttest_unreadable	scCsb|j|jd}d}x-trM|jd}|s@Pn||7}q!W|j|ddS(NsAA
BBuiuAA
BB(RRR!R9R`(RR)treadsR((s(/usr/local/lib/python2.7/test/test_io.pyttest_read_one_by_one	s	cCs|j|jd}|j|jdddg|jd|j|jddddg|jd|j|jdddgdS(NsAA
BB
CCuAA
uBB
uCCii(RRR`RR'R*(RR)((s(/usr/local/lib/python2.7/test/test_io.pyR(	s
"
cCsr|j|jddd}d}x-trU|jd}|sHPn||7}q)W|j|ddddS(NRis
BuiuAu
B(RRR!R9R`(RR)RRR((s(/usr/local/lib/python2.7/test/test_io.pyttest_read_by_chunk	s 	cCs[dddg}|j}|j|}|j||j|j|jddS(NuabucduefRY(RRRqRR`R(RRER+R)((s(/usr/local/lib/python2.7/test/test_io.pyR|	s

cCsatdddg}|j}|j|}|j||j|j|jddS(NuabucduefRY(RRRRqRR`R(RRER+R)((s(/usr/local/lib/python2.7/test/test_io.pyR}	s

cCsd|j|j}|jt|jdddg|jt|jd|jt|jddS(NiiiR(RRRaRbRqR*(RR)((s(/usr/local/lib/python2.7/test/test_io.pyR~	scCsn|j|j|jdd}d}x-trV|jd}|sIPn||7}q*W|j||jdS(NRuasciiui(RRR
R!R9R`R(RR)RRR((s(/usr/local/lib/python2.7/test/test_io.pyttest_issue1395_1	s!	cCsw|j|j|jdd}d|_d}x-tr_|jd}|sRPn||7}q3W|j||jdS(NRuasciiiu(RRR
RR!R9R`R(RR)RRR((s(/usr/local/lib/python2.7/test/test_io.pyttest_issue1395_2	s!		cCs|j|j|jdd}d|_|jd}||jd7}||j7}||j7}||j7}|j||jdS(NRuasciii(RRR
RR9RpR`R(RR)RR((s(/usr/local/lib/python2.7/test/test_io.pyttest_issue1395_3	s!	cCs`|j|j|jdd}d|_|jd}||j7}|j||jdS(NRuasciii(RRR
RR9R`R(RR)RR((s(/usr/local/lib/python2.7/test/test_io.pyttest_issue1395_4	s
!	cCs||j|j|jdd}d|_|jd}|j}|jd|j||j|jdddS(NRuasciiiiuBBB
(RRR
RR9R(R'R`(RR)RRR	((s(/usr/local/lib/python2.7/test/test_io.pyttest_issue1395_5
s!	

cCsG|j|j}|j|dd}|j|j|jdS(NRuascii(RR
RR`R%(RRcR)((s(/usr/local/lib/python2.7/test/test_io.pyttest_issue2282
scCstj}xdD]}|j|dd| }|jd|j}WdQX|j|d&}|j|jdj|WdQX|j|dd|}|jd	WdQX|j|d&}|j|jd
j|WdQXqWdS(Nu	utf-8-siguutf-16uutf-32uwRuaaaurbuauxxxuaaaxxx(u	utf-8-siguutf-16uutf-32(RYR[RR R(R`R9Ru(RtfilenametcharsetRR	((s(/usr/local/lib/python2.7/test/test_io.pyttest_append_bom
s	

%cCstj}xd
D]}|j|dd| }|jd|j}WdQX|j|dd|;}|j||jd|jd	|jd
WdQX|j|d&}|j|jdj|WdQXqWdS(Nu	utf-8-siguutf-16uutf-32uwRuaaaur+uzzziubbburbubbbzzz(u	utf-8-siguutf-16uutf-32(	RYR[RR R(R'R`R9Ru(RR[R\RR	((s(/usr/local/lib/python2.7/test/test_io.pyt
test_seek_bom%
s	




cCsl|jtjd}|j|jdWdQX|jtjddd}|j|jdWdQXdS(NuwustrictR9ureplace(RRYR[R`R9(RR((s(/usr/local/lib/python2.7/test/test_io.pyttest_errors_property4
su!Threading required for this test.cstj|jtjdddvfd}gtdD]!}tjd|d|f^qI}tj|jt	j
dWdQXWdQX|jtjGj}x1tdD]#}|j|j
d	|dqWWdQXdS(
NuwR}ics%d|}jj|dS(NuThread%03d
(twaitR (R.ttext(teventR(s(/usr/local/lib/python2.7/test/test_io.pytrun?
s

iR;Rg{Gz?uThread%03d
(R?tEventRRYR[RR@RAtsetRBRCR9R`R(RRcRfRFtcontentR.((RbRs(/usr/local/lib/python2.7/test/test_io.pyttest_threads_write:
s1cs|j|j|jddgfd}|_|jtj|jj|jj	j|j|j
d|j
dd_dS(NRuasciics#jjjg(tdS(N(R@RcRA((R@R)(s(/usr/local/lib/python2.7/test/test_io.pyRQ
siicSsdS(N(R*(((s(/usr/local/lib/python2.7/test/test_io.pyR[
R7(RRR
RRaRARBRR@RcR(RR((R@R)s(/usr/local/lib/python2.7/test/test_io.pyRL
s!	
cCsV|j|j|jdd}|j|j|j|jt|jdS(NRuascii(RRR
RBRaRSR(RR)((s(/usr/local/lib/python2.7/test/test_io.pyR]
s
!


cCs\|j|j|jdd}|j|j}|jttf||_WdQXdS(NRuascii(RRR
RaRRbRc(RR)R+((s(/usr/local/lib/python2.7/test/test_io.pyRd
s!csdjffdY}djffdY}j|d}jt|jdWdQXj|d}jt|jWdQXj|d}j|jddS(NtNonbytesStreamcseZjjZRS((R1R2tStringIOR9R#((R(s(/usr/local/lib/python2.7/test/test_io.pyRhm
scseZjjZRS((R1R2RiR9R#((R(s(/usr/local/lib/python2.7/test/test_io.pyRho
suai(RiRtmaybeRaisesRbR9RpR`(RRhR((Rs(/usr/local/lib/python2.7/test/test_io.pyttest_read_nonbytesj
scsdd
dYfd}tjd}tj|dt?tj|d|#tjtjddd}WdQXWdQX|jt	|j
d	|jWdQXdS(Nt
BadEncodercBseZdZRS(cSsdS(Nuspam((RR((s(/usr/local/lib/python2.7/test/test_io.pyRu~
s(R1R2Ru(((s(/usr/local/lib/python2.7/test/test_io.pyRl}
scsS(N((R(Rl(s(/usr/local/lib/python2.7/test/test_io.pytget_bad_encoder
surot13u_is_text_encodinguincrementalencodertfooRubar((RRRYt	swap_attrR!R
RRRaRbR R(RRmtrot13R((Rls(/usr/local/lib/python2.7/test/test_io.pyttest_illegal_encoderz
s*
csfdtj)jjddddd}WdQXjt|jdWdQXtj)jjddddd}WdQXjt|jWdQXtj)jjddddd}WdQXjt|jWdQXfd}|d	}jt|jd	WdQX|d
}jt|jd	WdQXdS(NcsQtjd}t|_z(jjddddd}Wdt|_X|S(Nuquopri_codectaaaaaaRu
R(RRR!t_is_text_encodingRRR~(tquopriR(R(s(/usr/local/lib/python2.7/test/test_io.pyt_make_illegal_wrapper
s	
RrRu
Ruquopri_codecics^ddfdYfd}tjd}tj|d|SWdQXdS(Nt
BadDecodercseZfdZRS(csS(N((R(tgetstate_ret_val(s(/usr/local/lib/python2.7/test/test_io.pyR
s(R1R2R((Rw(s(/usr/local/lib/python2.7/test/test_io.pyRv
scsS(N((R(Rv(s(/usr/local/lib/python2.7/test/test_io.pyt_get_bad_decoder
suquopri_codecuincrementaldecoder((RRRYRo(RwRxRt(Ru(RvRws(/usr/local/lib/python2.7/test/test_io.pyt_make_very_illegal_wrapper
s
i*((RYRRRRjRbR9Rp(RRRy((RuRs(/usr/local/lib/python2.7/test/test_io.pyttest_illegal_decoder
s.




cCs|j|jddd}|jd|j|j|j|jddd}|jd|jd|jdS(NttestRuasciiiux(RRR9R(R (RR((s(/usr/local/lib/python2.7/test/test_io.pyttest_issue25862
s




(5R1R2R\R]RRRRRRRRRR'R*R/RRRR6R2R?RFRGRRORQRSR(RTR|R}R~RURVRWRXRYRZR]R^R_RRJR?RgRRRRkRqRzR|(((s(/usr/local/lib/python2.7/test/test_io.pyRs`														*											/			
											
										8tCTextIOWrapperTestcBs8eZdZdZdZdZejjZ	RS(cCs|jd}|j|d}|j|}|jt|j|dd|jt|j|jt|j|dd|jt|j|jj|j}|jt	t
|dS(Nsé

iRi*uxyzzy(RRRRRaRbRRSR9RR8R(RRRR((s(/usr/local/lib/python2.7/test/test_io.pyRN
scCstjtjd}|j|}|j|dd}|jd||_tj	|}~tj
|j|||jtjd}|j
|jdWdQXdS(NuwbRuasciiu456defurbt456def(R
RRYR[RRR RfRRRRRR`R9(RRRRRR((s(/usr/local/lib/python2.7/test/test_io.pyR
s
	
cCsxtdD]~}|j|j|j}|j|dd}|j|j|j}|j|dd}||_||_q
WtjdS(NiRuascii(RRR6RtbuddyRYR(RRtb1tt1tb2tt2((s(/usr/local/lib/python2.7/test/test_io.pyt!test_rwpair_cleared_before_textio
s	
cCs;|j|jdd}|jt|`WdQXdS(NRuascii(RRRaRR(RR((s(/usr/local/lib/python2.7/test/test_io.pyt test_del__CHUNK_SIZE_SystemError
s(
R1R2RNRRRRtTestCaseRaRj(((s(/usr/local/lib/python2.7/test/test_io.pyR}
s
				tPyTextIOWrapperTestcBseZejdZRS(cos	dVdS(N((RRtkwds((s(/usr/local/lib/python2.7/test/test_io.pyRjs(R1R2t
contextlibtcontextmanagerRj(((s(/usr/local/lib/python2.7/test/test_io.pyRstIncrementalNewlineDecoderTestcBs5eZdZdZdZdZdZRS(cssfd}|dd|dd|dd|dd|dd|dd|dd|ddjtjdd	tj|d
d|dd|ddd	t|ddd	t|dd|d
d|dd|dd|dd|dd|dd|dd|d
d|dd|d
ddS(NcsUj}jj|||j|jj|||dS(N(RR`RR(RRNRR(tdecoderR(s(/usr/local/lib/python2.7/test/test_io.pyt
_check_decodes
s袈u袈sussR7Rs
u
s
Ru
as

u

s
as袈
u袈
s袈
(RatUnicodeDecodeErrorRR!R(RRR((RRs(/usr/local/lib/python2.7/test/test_io.pytcheck_newline_decoding_utf8
s4




















csfg|dk	r<tj|fd}ndfd}|jjd|d|jjd|d|jjd|d|jjd
|d|jjd|d|jd
jdjd}dk	r6jj|}n|jj|d|jjddS(Ncs4x-j|D]}jj|qWdS(N(RuRR(RNR(Rtencodertresult(s(/usr/local/lib/python2.7/test/test_io.pyt_decode_bytewise8scs+x$|D]}jj|qWdS(N(RR(RNR(RR(s(/usr/local/lib/python2.7/test/test_io.pyR>s
uabc

u
u
abcu
uabc
uabcu
uuabc

abcabc
abcabc(u
u
(u
u
(u
u
u
(	R*RtgetincrementalencoderR`tnewlinesRMRRuR(RRRRR((RRRs(/usr/local/lib/python2.7/test/test_io.pytcheck_newline_decoding4s0






c	Csd
}xK|D]C}|o(tj|}|j|d	t}|j||q
Wtjd}|j|d	t}|j|dS(Nuutf-8ulatin-1uutf-16u	utf-16-leu	utf-16-beuutf-32u	utf-32-leu	utf-32-bet	translate(	Nuutf-8ulatin-1uutf-16u	utf-16-leu	utf-16-beuutf-32u	utf-32-leu	utf-32-be(R*RtgetincrementaldecodertIncrementalNewlineDecoderR!RR(RRR4R((s(/usr/local/lib/python2.7/test/test_io.pyttest_newline_decoderUs
csQfd}jddt}||jddt}||dS(Ncsoj|jdj|jddj|jdj|jddj|jddS(Nuഀu਀(R`RR*R(tdec(R(s(/usr/local/lib/python2.7/test/test_io.pyt_checkgs
R(RR*R~R!(RRR((Rs(/usr/local/lib/python2.7/test/test_io.pyttest_newline_byteses

cCsx?d
D]7}tjd}|j||}|j|qWtjd}|j|dd}|j|jdd	dS(Niiiiuutf-8Ris

u

(iiii(RRRRR`R(RRR((s(/usr/local/lib/python2.7/test/test_io.pyttest_translaters
(R1R2RRRRR(((s(/usr/local/lib/python2.7/test/test_io.pyRs
	*	!		
tCIncrementalNewlineDecoderTestcBseZRS((R1R2(((s(/usr/local/lib/python2.7/test/test_io.pyR|stPyIncrementalNewlineDecoderTestcBseZRS((R1R2(((s(/usr/local/lib/python2.7/test/test_io.pyRst
MiscIOTestcBseZdZdZdZdZdZdZdZdZ	dZ
eje
d	d
Zeje
d	dZdZd
ZRS(cCstjtjdS(N(RYRZR[(R((s(/usr/local/lib/python2.7/test/test_io.pyR]scCsx|jjD]}t|j|d}|j|||dkrJq
q
d|jksh|dkr|jt|t|q
|j	ds
|jt||j
q
q
WdS(NuopenuerroruUnsupportedOperationuSEEK_(R
t__all__tgetattrR*RtlowerRt
issubclassR8R	R(RRR((s(/usr/local/lib/python2.7/test/test_io.pyttest___all__scCs|jtjddd}|j|jd|j|jtjd}|j|jtj|j|jjtj|j|jjjtj|j|jd|j|jjd|j|jjjd|j|jtjd}|j|jd|j|jjd|j|jjjd|j|j	ddt
}|j|jd|j|jjd|j|j|j	|j|jj|j	|j|jdS(	NuwbR}iuUurbuw+urb+R(RRYR[R`RrRBRRcRR#R~(RRR((s(/usr/local/lib/python2.7/test/test_io.pyttest_attributess,


cCsxidd6idd6idd6dd6idd6dd6idd6dd6idd6id	d6idd6dd6idd6dd6id	d6dd6id
d6idd6id
d6dd6id
d6dd6idd6dd6gD]}|jtj|}|j|jt|j|jt|j|jt|j|jt|j	t
|dru|jt|jdn|jt|jt
|d
r|jt|j
dnt
|dr|jt|jnt
|dr|jt|jtdn|jt|j|jt|j|jt|jd|jt|jd|jt|j|jt|j|jt|jd|dkrdnd|jt|jg|jtt|qWdS(Nuwumodeuwbiu	bufferingiiururbuw+uw+bupeekuread1iureadallureadintoubR7u(RRYR[RBRaRSRR#Rt__iter__thasattrR3R9R#R4R/RRpRR'R(R0R RqR(RRR((s(/usr/local/lib/python2.7/test/test_io.pyttest_io_after_closesR






cCs|jt|j|jt|jd|jt|jdddd|jt|jddd|jdd}|j|jddtfdY}|d}|jd|}||_||_t	j
|}~~tj|j
||dS(	NiiiiuitCcBseZRS((R1R2(((s(/usr/local/lib/python2.7/test/test_io.pyRs(RaRbRUR*R`RstunicodeRRRRRYRR(RRRRR((s(/usr/local/lib/python2.7/test/test_io.pyttest_blockingioerrors		
cCs\|j|jtj|j|jtj|j|jtj|j|jtjdS(N(tassertIsInstanceRRtABCMetaRRR(R((s(/usr/local/lib/python2.7/test/test_io.pyt	test_abcssc	CsH|jtjdddS}|j||j|j||j|j||j|j||jWdQX|jtjdS}|j||j|j||j|j||j|j||jWdQX|jtjdS}|j||j|j||j|j||j|j||jWdQXdS(NuwbR}iuw(	RRYR[RRRtassertNotIsInstanceRR(Rt	abcmoduleR((s(/usr/local/lib/python2.7/test/test_io.pyt_check_abc_inheritancescCs|j|dS(N(R(R((s(/usr/local/lib/python2.7/test/test_io.pyttest_abc_inheritancescCs|jtdS(N(RR
(R((s(/usr/local/lib/python2.7/test/test_io.pyttest_abc_inheritance_officialsufcntl required for this testcCs|jddS(Niii@(t_test_nonblock_pipe_write(R((s(/usr/local/lib/python2.7/test/test_io.pyttest_nonblock_pipe_write_bigbufscCs|jddS(Ni(R(R((s(/usr/local/lib/python2.7/test/test_io.pyt!test_nonblock_pipe_write_smallbufscCsXtj|tj}|j|dtj|tj|tjB}|j|ddS(Nii(tfcntltF_GETFLtassertNotEqualtF_SETFLRt
O_NONBLOCKR`(RRtflagsRH((s(/usr/local/lib/python2.7/test/test_io.pyt_set_non_blockingscCsTg}g}tj\}}|j||j||j|dddtd|}|j|dddtd|}||rxdD]}yVd	}	xItrt|	d
dg|}
|j|
|j|
|	d7}	qWWq|jk
re}|j	|j
d	tj|d
|j
 |d
<|j|jd}
|j|
|j|
qXqWxrtry|jPWqm|jk
r}|j	|j
d	tj|j	|j
d	|j|jqmXqmW|t|jd7}WdQXWdQXdj|dj|}}|j	|||j|j|j|jdS(NRrurbRR}uwbi'iIiiiiaiitBLOCKEDR7(i'iIi(RtpipeRRR!RRR RUR`RterrnotEAGAINRsR9RtiterR*RMRR@(RRtsenttreceivedRRtrftwfRDRtmsgR1((s(/usr/local/lib/python2.7/test/test_io.pyRsJ

!!
	


	
"(R1R2R]RRRRRRRRRRJRRRRR(((s(/usr/local/lib/python2.7/test/test_io.pyRs				,						tCMiscIOTestcBseZeZdZRS(u,RuntimeError: could not find io module state(R1R2R
tshutdown_error(((s(/usr/local/lib/python2.7/test/test_io.pyRNstPyMiscIOTestcBseZeZdZRS(u$LookupError: unknown encoding: ascii(R1R2RWR
R(((s(/usr/local/lib/python2.7/test/test_io.pyRRsuntu%POSIX signals required for this test.tSignalsTestcBseZdZdZdZejedeje	j
dkddZd	Zd
Z
dZdZd
ZdZdZdZdZejeddZdZdZRS(cCstjtj|j|_dS(N(tsignaltSIGALRMtalarm_interrupttoldalrm(R((s(/usr/local/lib/python2.7/test/test_io.pyR\ZscCstjtj|jdS(N(RRR(R((s(/usr/local/lib/python2.7/test/test_io.pyR]]scCsdddS(Nii((Rtsigtframe((s(/usr/local/lib/python2.7/test/test_io.pyR`su!Threading required for this test.ufreebsd5ufreebsd6ufreebsd7u'issue #12429: skip test on FreeBSD <= 7c		sggfd}tjd|}t|_tj\}z|jj||}|jzIt	j
d|jt'|j
|tjt|dWdQXWdt	j
d|jXjtjd|j|dd!|dd!gWdtj|tjy|jWn+tk
ra}|jtjkrbqbnXXdS(uCheck that a partial write, when it gets interrupted, properly
        invokes the signal handler, and bubbles up the exception raised
        in the latter.cs#tjd}j|dS(Ni(RR9R(RN(Rtread_results(s(/usr/local/lib/python2.7/test/test_io.pyRksR;iNii(R?R@R!tdaemonRRR
RtstartRtalarmRaRR RYt
PIPE_MAX_SIZERRMRR9R`RBRARtEBADF(	RtitemRt
fdopen_kwargsRRRtwioR1((RRs(/usr/local/lib/python2.7/test/test_io.pytcheck_interrupted_writecs.	

,
(

cCs |jdddddddS(NRRruwbR}i(R(R((s(/usr/local/lib/python2.7/test/test_io.pyt!test_interrupted_write_unbufferedscCs|jdddddS(NRRruwb(R(R((s(/usr/local/lib/python2.7/test/test_io.pyttest_interrupted_write_bufferedscCs |jdddddddS(NuxyRRruwRuascii(R(R((s(/usr/local/lib/python2.7/test/test_io.pyttest_interrupted_write_textsc	s6fd}tjtj|tj\}}|jj||ztjd|jtt	fV}xLx+t
dD]}jjqWtj
|tdqwWWdQX|j}t|t	r	|jt|jdt|nWdtjdjtj|XdS(NcsjdddS(Nii(R (R(R-R(s(/usr/local/lib/python2.7/test/test_io.pyton_alarms
iidureentrant calli(RRRRR
RRRaRtRuntimeErrorRR RR9RRt
isinstanceRRR	RB(	RR-RRRRtcmRtexc((R-Rs(/usr/local/lib/python2.7/test/test_io.pytcheck_reentrant_writes$

$	,

cCs|jddddS(NRRruwb(R(R((s(/usr/local/lib/python2.7/test/test_io.pyttest_reentrant_write_bufferedscCs|jddddddS(NuxyRruwRuascii(R(R((s(/usr/local/lib/python2.7/test/test_io.pyttest_reentrant_write_textscstj\}t|d<fd}tjtj|zU|jj||}tjdtjd|j	||j
ddWdtjd|jtjtj|XdS(	uCheck that a buffered read, when it gets interrupted (either
        returning a partial result or EINTR), properly invokes the signal
        handler and retries if the latter returned successfully.uclosefdcstjddS(Ntbar(RR (RR(R(s(/usr/local/lib/python2.7/test/test_io.pyt
alarm_handlersRniiufoobarNi(RRR~RRR
RR RR`R9RB(RRRRRtrio((Rs(/usr/local/lib/python2.7/test/test_io.pytcheck_interrupted_read_retrys

#


cCs|jddddS(NcSs
|jdS(Nulatin1(R(Rf((s(/usr/local/lib/python2.7/test/test_io.pyRR7Rrurb(R(R((s(/usr/local/lib/python2.7/test/test_io.pyt%test_interrupterd_read_retry_bufferedscCs|jddddS(NcSs|S(N((Rf((s(/usr/local/lib/python2.7/test/test_io.pyRR7Rrur(R(R((s(/usr/local/lib/python2.7/test/test_io.pyt!test_interrupterd_read_retry_textsc	stjdtj}tj\}t|d<gtd
gfd}tjd|t	_
fd}fdtjtj|z|j
j||}tjd|j||j|||jt	j|jd|j|td	DWd
tjdt	tj|tjy|jWn+tk
r}|jtjkrqnXXd
S(uCheck that a buffered write, when it gets interrupted (either
        returning a partial result or EINTR), properly invokes the signal
        handler and retries if the latter returned successfully.uselectuclosefdcsy\xUsZxHjgggddkrVtjd}j|qWqWWntk
r{}|d<nXdS(Ng?ii(tselectRR9Rt
BaseException(RNR(terrorRRRtwrite_finished(s(/usr/local/lib/python2.7/test/test_io.pyRs	(R;cs$tjtjtjddS(Ni(RRR(RR(talarm2(s(/usr/local/lib/python2.7/test/test_io.pytalarm1scsjdS(N(R(RR(R(s(/usr/local/lib/python2.7/test/test_io.pyRsiicss|]}t|VqdS(N(R(t.0Rf((s(/usr/local/lib/python2.7/test/test_io.pys	<genexpr>
sN(RYt
import_moduleRRRR~R*R?R@R!RRRR
RRR`R RRMRtsumRBRARR(	RRRRDRRRRR1((RRRRRRRs(/usr/local/lib/python2.7/test/test_io.pytcheck_interrupted_write_retrys>	
		


$


cCs|jddddS(NRfRruwb(R(R((s(/usr/local/lib/python2.7/test/test_io.pyt&test_interrupterd_write_retry_buffered
scCs|jddddddS(NuxRruwRulatin1(R(R((s(/usr/local/lib/python2.7/test/test_io.pyt"test_interrupterd_write_retry_text
s(ufreebsd5ufreebsd6ufreebsd7(R1R2R\R]RRRJR?tskipIfRRRRRRRRRRRRRRR(((s(/usr/local/lib/python2.7/test/test_io.pyRWs$			-									>	tCSignalsTestcBseZeZRS((R1R2R
(((s(/usr/local/lib/python2.7/test/test_io.pyR!
st
PySignalsTestcBseZeZdZdZRS(N(R1R2RWR
R*RR(((s(/usr/local/lib/python2.7/test/test_io.pyR$
scstttttttttt	t
ttt
tttttf}ttttttf}tjdg}td|D}td|D}t|jfd|D|jfd|Dtj|d<x|D]}|j j!dr2xo|j"D]\}}t#|||qWq|j j!drx-|j"D]\}}t#|||qQWqqWt$j%|dS(	NuIncrementalNewlineDecodercss$|]}|tt|fVqdS(N(RR
(RR((s(/usr/local/lib/python2.7/test/test_io.pys	<genexpr>?
scss$|]}|tt|fVqdS(N(RRW(RR((s(/usr/local/lib/python2.7/test/test_io.pys	<genexpr>@
sc3s)|]}|jd|jfVqdS(uCN(R1(RRf(tglobs(s(/usr/local/lib/python2.7/test/test_io.pys	<genexpr>B
sc3s)|]}|jd|jfVqdS(uPyN(R1(RRf(R(s(/usr/local/lib/python2.7/test/test_io.pys	<genexpr>C
suopenuCuPy(&RRRLRSRRRRRRRRRR}RRRRRR6R<RER?RKRR
RtdicttglobalstupdateRWtOpenWrapperR1R	R-tsetattrRYtrun_unittest(R+tmockstall_memberstc_io_nstpy_io_nsR{RR((Rs(/usr/local/lib/python2.7/test/test_io.pyt	test_main-
s6	

u__main__(bR3t
__future__RRRRRBRR<RRRvRRRt	itertoolsRRtcollectionsRRR{RRYRRR
t_pyioRWR?tImportErrorR*Rttypet
__metaclass__t
py3k_bytesRRRRRR4R5R6R:R;R<R=R>R?RCRDRERRIRJRKRTRVRRXRRRRRRLRSRTRRRRRRRRRRtregisterRRRR}RRRRRRRRRRRRRR1(((s(/usr/local/lib/python2.7/test/test_io.pyt<module>s



			8
,0-	W+4t		#

Zerion Mini Shell 1.0