%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_file2k.pyc


Nac@sddlZddlZddlZddlZddlZddlZddlZddlZddlZddl	m	Z	ddl
mZyddlZWne
k
reZnXddlmZddlmZmZmZddlmZdejfdYZd	ejfd
YZdejfdYZejed
dejfdYZejejdkddejfdYZdejfdYZdZe dkrendS(iN(tarray(tproxy(ttest_support(tTESTFNtrun_unittesttrequires(tUserListt
AutoFileTestscBseZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZRS(cCsttd|_dS(Ntwb(topenRtf(tself((s,/usr/local/lib/python2.7/test/test_file2k.pytsetUpscCs*|jr|jjntjtdS(N(R
tclosetostremoveR(R((s,/usr/local/lib/python2.7/test/test_file2k.pyttearDowns	cCskt|j}|jd|j|jj|j|jjd|_|jtt	|ddS(Nt
teststringttell(
RR
twritetassertEqualRR
tNonetassertRaisestReferenceErrortgetattr(Rtp((s,/usr/local/lib/python2.7/test/test_file2k.pyttestWeakRefs s

	c	Cs|j}tj|j}WdQX|j|j|jtj||_WdQXx-dD]%}|jtt	ft
||dq]WdS(Ntnametmodetclosedtoops(RRR(R
Rtcheck_py3k_warningst	softspaceRRRRtAttributeErrort	TypeErrortsetattr(RR
R tattr((s,/usr/local/lib/python2.7/test/test_file2k.pyttestAttributes)s	


cCsn|jjd|jjtdd}ttd|_|jj|}|jd|j| dS(Nt12tctxi
trbt
xxxxxxxxxx(	R
RR
RR	RtreadintoRttostring(Rtatn((s,/usr/local/lib/python2.7/test/test_file2k.pyttestReadinto:s
cCsdtddg}|jj||jjttd|_|jj}|j|ddS(Nt1t2R)R&(RR
t
writelinesR
R	RtreadR(Rtltbuf((s,/usr/local/lib/python2.7/test/test_file2k.pyttestWritelinesUserListCs
cCs&|jt|jjdddgdS(Niii(RR"R
R2(R((s,/usr/local/lib/python2.7/test/test_file2k.pyttestWritelinesIntegersLscCs2tdddg}|jt|jj|dS(Niii(RRR"R
R2(RR4((s,/usr/local/lib/python2.7/test/test_file2k.pyttestWritelinesIntegersUserListPscCs<dddY}|jt|jj||gdS(Nt	NonStringcBseZRS((t__name__t
__module__(((s,/usr/local/lib/python2.7/test/test_file2k.pyR9Ws((RR"R
R2(RR9((s,/usr/local/lib/python2.7/test/test_file2k.pyttestWritelinesNonStringUscCs^|jjtddg|jjttd|_|jj}|j|ddS(NR'tabcR)(R
R2RR
R	RR3R(RR5((s,/usr/local/lib/python2.7/test/test_file2k.pyttestWritelinesBuffer]s

cCs|jt|jjdttjdkr8dnd}t|d:}|jt	j
||jt|jd|WdQXdS(Ns<open file 'twin32sxx
xx
xx'xx"xxsxx'xxtws<open file %r, mode 'w' at(t
assertTruetreprR
t
startswithRtsystplatformR	t
addCleanupRR(RtfnameR
((s,/usr/local/lib/python2.7/test/test_file2k.pyttestReprds#cCs|jjttd|_|j}|j|jt|j|j|j|j|j	t
|jd|j|j|jdS(NR)t(R
R
R	RRRRAtisattyRRR"R+(RR
((s,/usr/local/lib/python2.7/test/test_file2k.pyt
testErrorsos
	
c
Csqddddddddd	d
ddd
g
}dg}tjjdrX|jdn|jjddd|j|jjx0|D](}t	|j|}|j
t|qWtj
8x0|D](}t	|j|}|j
t|qWWdQX|j
t|jjg|j|jjddddyddWn)|j|jjtjdnXdS(NtfilenotflushRJtnextR3R+treadlinet	readlinestseekRttruncateRt__iter__t
xreadlinestatheosii(RDRERCRR
t__exit__RRARRRt
ValueErrorRRR2Rtexc_info(Rtmethodstdeprecated_methodst
methodnametmethod((s,/usr/local/lib/python2.7/test/test_file2k.pyttestMethods{s*	


"cCs|jt|jjdS(N(RtIOErrorR
R3(R((s,/usr/local/lib/python2.7/test/test_file2k.pyttestReadWhenWritingscs/fd}jtjj|dS(Nc3sBx;tdD]-}|dkr/jjnt|Vq
WdS(Nii(trangeR
R
tstr(ti(R(s,/usr/local/lib/python2.7/test/test_file2k.pytnastys(RRWR
R2(RRc((Rs,/usr/local/lib/python2.7/test/test_file2k.pyttestNastyWritelinesGeneratorscsd}xddddgD]}xbdddgD]Q}tt|_jj|jttj|jjq/Wtt|_jj|jtfd	jjtt|_jj|jtjjt	t
|jjqWxd
ddd
ddddgD]}tt|_jtjj|jjtt|_jtjj||gjjtt|_jtjjjjqCWdS(NtxxxR@RR-tabR3RORPcsgjD]}|^q
S(N(R
(tline(R(s,/usr/local/lib/python2.7/test/test_file2k.pyt<lambda>RItrR)tUtUbtUrtrUtrbUtrUb(
R	RR
RRR^RR
R+t	bytearraytlenR2RR(RtdataRR$((Rs,/usr/local/lib/python2.7/test/test_file2k.pyt
testIssue5677s2
%%

(R:R;RRRR%R/R6R7R8R<R>RHRKR]R_RdRs(((s,/usr/local/lib/python2.7/test/test_file2k.pyRs 																		tOtherFileTestscBseZdZdZdZdZdZdZdZdZ	dZ
eje
jd	kd
dZejejdkdejdddedZRS(cCstjjtptj}xldD]d}y(|rCt||}nt|}Wn&tk
rx}|j|j	|q"X|j
dq"WdS(NR@s+opening a directory didn't raise an IOError(NR@(Rtpathtdirnamet__file__tcurdirRR	R^Rtfilenametfail(Rtthis_dirRR
te((s,/usr/local/lib/python2.7/test/test_file2k.pyttestOpenDirs
cCsxPdD]H}ytt|}Wntk
r3qX|j|jd|qWx^tttttdfD]=}yt|d}Wnttfk
rqsX|jqsWdS(NRItaUswU+s%r is an invalid file modes	trr(RIR~swU+(R	RRWR
RztunicodeR^(RRR
R((s,/usr/local/lib/python2.7/test/test_file2k.pyttestModeStringss


&cCs[tjdkr|jdntjjs>|jdn|jttjjddS(Ntosf1V5sISkipping sys.stdin.seek(-1), it may crash the interpreter. Test manually.s stdin must be a TTY in this testi(RDREtskipTesttstdinRJRR^RQ(R((s,/usr/local/lib/python2.7/test/test_file2k.pyt
testStdinSeeks
cCs|jttjjdS(N(RR^RDRRR(R((s,/usr/local/lib/python2.7/test/test_file2k.pyttestStdinTruncatescCsPtttd}|jt|jdt|jtjtdS(NR@s
<open file u'(	R	RRRARBRCR
Rtunlink(RR
((s,/usr/local/lib/python2.7/test/test_file2k.pyttestUnicodeOpens 
cCsd}ytt|}Wnatk
r|}|jddkrt|}t|ksb||kry|jd|qyqnX|j|jd|dS(Ntqwertyis&bad error message for invalid mode: %ssno error for invalid mode: %s(R	RRWtargsRaRzR
(Rtbad_modeR
tmsgts((s,/usr/local/lib/python2.7/test/test_file2k.pyttestBadModeArguments
cCsxdD]}yuttd|}|jt||j|jttd|}t|j}|j|jWn0tk
r}|jd|t|fnX|j	||qWdS(	NiiiiR@Ris error setting buffer size %d: %s(iiii(
R	RRRaR
tintR3R^RzR(RRR
tdR((s,/usr/local/lib/python2.7/test/test_file2k.pyttestSetBufferSizes



!cs<tjtfd}z|WdtjtXdS(Ncsttd}|jd|jttd}|jd}|dkrdjd|n|jdkrjd|jn|j|jdkrjd|jn|jtj	j
t}|dkrjd	|ndS(
NRt12345678901srb+it12345s(Read on file opened for update failed %rsFile pos after read wrong %ds!File pos after ftruncate wrong %ds"File size after ftruncate wrong %d(R	RRR
R3RzRRRRRutgetsize(R
Rrtsize(R(s,/usr/local/lib/python2.7/test/test_file2k.pyt	bug801631%s 



(RRR(RR((Rs,/usr/local/lib/python2.7/test/test_file2k.pyttestTruncateOnWindows"s

cCsd}d}|t|s)td|t|}dddddd	g}d
dfdd fdd!fd
tdddffg}z6ttd}|j|||j||jx|D]\}}tt}	|	j|kr|j	dfnt
|	|}
y|
|Wntk
r6nX|j	d||f|	jqWtt}	xt|D]}|	jquW|j
d}y|	j}
Wntk
r|j	dnX|
|kr|j	d|
|fn|j
d}tddt|}y|	j|Wntk
rH|j	dnX|j}
|
|kr{|j	d|
|fn|j
d}y|	jt|}
Wntk
r|j	dnX|
|kr|j	d|
|fny|	j}Wntk
r|j	dnX||krA|j	d|
|fntt}	zex|	D]}
qWWy/|	j|	j||	j|	jWntk
r|j	dnXWd|	jXWdtjtXdS("Ni@sham
s*dataoffset must be multiple of len(filler)sspam, spam and eggs
seggs, spam, ham and spam
ssaussages, spam, spam and eggs
sspam, ham, spam and eggs
s(spam, spam, spam, spam, spam, ham, spam
swonderful spaaaaaam.
ROR3RPR+R't idR@sBroken testfiles)%s%r after next() didn't raise ValueErrorisLreadline() after next() with supposedly empty iteration-buffer failed anywaysEreadline() after next() with empty buffer failed. Got %r, expected %rssLreadinto() after next() with supposedly empty iteration-buffer failed anywaysEreadinto() after next() with empty buffer failed. Got %r, expected %rsHread() after next() with supposedly empty iteration-buffer failed anywaysAread() after next() with empty buffer failed. Got %r, expected %rsMreadlines() after next() with supposedly empty iteration-buffer failed anywaysFreadlines() after next() with empty buffer failed. Got %r, expected %rs'read* failed after next() consumed file((((RqtAssertionErrorRR	RRR2R
RNRzRRWR`tpopROR+R,R3RPRR(Rt
dataoffsettfillertnchunkst	testlinesRYtbagR[RR
tmethRbttestlineRgR5tlines((s,/usr/local/lib/python2.7/test/test_file2k.pyt
testIterationAs			


		
	
	
	
	




tposixstest requires a posix system.cCsd}tjj|o0tjtj|jsG|jd|nt|dd*}|jt	|j
dWdQXWdQXt|dd7}|jt	|j
d|j
dWdQXWdQXt|dd*}|jt	|j
d	WdQXWdQXdS(
Ns	/dev/fullsrequires %rRishello
thellos
ith(RRutexistststattS_ISCHRtst_modeRR	RR^R(RtdevfullR
((s,/usr/local/lib/python2.7/test/test_file2k.pyttest_write_fulls
iisrequires 64-bit systemg@tdry_runcCstdttd%}|j|d|jdWdQXttd}x|D]}qYWWdQX|jt|||j|jd|d}dS(Nt	largefileRisR)(	RR	RRQRRRqtcountR(RRtfpR4((s,/usr/local/lib/python2.7/test/test_file2k.pyttest_very_long_lines


II(R:R;R}RRRRRRRRtunittestt
skipUnlessRRRRDtmaxsizeRtprecisionbigmemtesttFalseR(((s,/usr/local/lib/python2.7/test/test_file2k.pyRts	
		
						o$tFileSubclassTestscBseZdZRS(cCsBdtfdY}|td}WdQX|j|jdS(NtCcBseZdZdZRS(cWst|_tj||dS(N(Rtsubclass_closedtfilet__init__(RR((s,/usr/local/lib/python2.7/test/test_file2k.pyRs	cSst|_tj|dS(N(tTrueRRR
(R((s,/usr/local/lib/python2.7/test/test_file2k.pyR
s	(R:R;RR
(((s,/usr/local/lib/python2.7/test/test_file2k.pyRs	R@(RRRAR(RRR
((s,/usr/local/lib/python2.7/test/test_file2k.pyttestExits(R:R;R(((s,/usr/local/lib/python2.7/test/test_file2k.pyRss!Threading required for this test.tFileThreadingTestscBseZdZdZdZdZdZddZddZd	Z	d
Z
dZdZd
Z
dZdZdZdZdZdZdZdZdZdZdZdZRS(cCstj|_d|_t|_t|jd}|jdj	dWdQXt
j|_d|_
d|_t|_dS(NR@s
t
0123456789i(Rtthreading_setupt_threadsRR
RRyR	Rtjoint	threadingtLockt_count_locktclose_counttclose_success_countRt
use_buffering(RR
((s,/usr/local/lib/python2.7/test/test_file2k.pyRs				cCss|jr7y|jjWq7ttfk
r3q7Xnytj|jWntk
r^nXtj|j	dS(N(
R
R
tEnvironmentErrorRWRRRyRtthreading_cleanupR(R((s,/usr/local/lib/python2.7/test/test_file2k.pyRs	
cCs@|jr't|jddd|_nt|jd|_dS(Nsw+t	bufferingiii@(RR	RyR
(R((s,/usr/local/lib/python2.7/test/test_file2k.pyt_create_files	cCsO|j|jd7_WdQX|jj|j|jd7_WdQXdS(Ni(RRR
R
R(R((s,/usr/local/lib/python2.7/test/test_file2k.pyt_close_files



cCs|j|jdS(N(RR(R((s,/usr/local/lib/python2.7/test/test_file2k.pyt_close_and_reopen_file
s
g?c	Cs|jd|_d|_WdQXt|_g}zx=t|D]/}tjd|}|j|j	|qAWxct
dD]U}tj|d|j3|j|j|dkrt
jrdGnPnWdQXqWtj|Wdt|_x|D]}|jqWXdS(NittargetiditQ(RRRRtdo_continueR`RtThreadtstarttappendtxrangettimetsleepRtverboseRR(Rtfunct
nb_workerstdurationtthreadsRbttt_((s,/usr/local/lib/python2.7/test/test_file2k.pyt_run_workerss*
		

		
icsYfd}j||tjrUddjj}jGd|GndS(Ncsxjtjfdfdf}x@|D]8}jsKPny|Wq8ttfk
roq8Xq8WdS(NcsS(N(((tio_func(s,/usr/local/lib/python2.7/test/test_file2k.pyRh/RIcs
jS(N(R((R(s,/usr/local/lib/python2.7/test/test_file2k.pyRh0RI(Rt	itertoolstcycleRR^RW(tfuncsR
(RR(s,/usr/local/lib/python2.7/test/test_file2k.pytworker,s

	gY@s%.4f (RRRRR(RRRRtpercent((RRs,/usr/local/lib/python2.7/test/test_file2k.pyt_test_close_open_io+s

	cCsd}|j|dS(NcSsdS(N((((s,/usr/local/lib/python2.7/test/test_file2k.pyRCs(R(RR((s,/usr/local/lib/python2.7/test/test_file2k.pyttest_close_openBs	cs fd}j|dS(NcsjjdS(N(R
RM((R(s,/usr/local/lib/python2.7/test/test_file2k.pyRHs(R(RR((Rs,/usr/local/lib/python2.7/test/test_file2k.pyttest_close_open_flushGscs fd}j|dS(NcsttjdS(N(tlisttiterR
((R(s,/usr/local/lib/python2.7/test/test_file2k.pyRMs(R(RR((Rs,/usr/local/lib/python2.7/test/test_file2k.pyttest_close_open_iterLscs fd}j|dS(NcsjjdS(N(R
RJ((R(s,/usr/local/lib/python2.7/test/test_file2k.pyRRs(R(RR((Rs,/usr/local/lib/python2.7/test/test_file2k.pyttest_close_open_isattyQscs fd}j|dS(NcsjdIJdS(NRI(R
((R(s,/usr/local/lib/python2.7/test/test_file2k.pyRWs(R(RR((Rs,/usr/local/lib/python2.7/test/test_file2k.pyttest_close_open_printVscs)t_fd}j|dS(NcsjdIJdS(NRI(R
((R(s,/usr/local/lib/python2.7/test/test_file2k.pyR]s(RRR(RR((Rs,/usr/local/lib/python2.7/test/test_file2k.pyttest_close_open_print_buffered[s	cs fd}j|dS(NcsjjddS(Ni(R
R3((R(s,/usr/local/lib/python2.7/test/test_file2k.pyRbs(R(RR((Rs,/usr/local/lib/python2.7/test/test_file2k.pyttest_close_open_readascs fd}j|dS(Ncs#tdd}jj|dS(NR'txxxxx(RR
R+(R-(R(s,/usr/local/lib/python2.7/test/test_file2k.pyRgs(R(RR((Rs,/usr/local/lib/python2.7/test/test_file2k.pyttest_close_open_readintofscs fd}j|dS(NcsjjdS(N(R
RO((R(s,/usr/local/lib/python2.7/test/test_file2k.pyRms(R(RR((Rs,/usr/local/lib/python2.7/test/test_file2k.pyttest_close_open_readlinelscs fd}j|dS(NcsjjdS(N(R
RP((R(s,/usr/local/lib/python2.7/test/test_file2k.pyRrs(R(RR((Rs,/usr/local/lib/python2.7/test/test_file2k.pyttest_close_open_readlinesqscs fd}j|dS(NcsjjdddS(Ni(R
RQ((R(s,/usr/local/lib/python2.7/test/test_file2k.pyRws(R(RR((Rs,/usr/local/lib/python2.7/test/test_file2k.pyttest_close_open_seekvscs fd}j|dS(NcsjjdS(N(R
R((R(s,/usr/local/lib/python2.7/test/test_file2k.pyR|s(R(RR((Rs,/usr/local/lib/python2.7/test/test_file2k.pyttest_close_open_tell{scs fd}j|dS(NcsjjdS(N(R
RR((R(s,/usr/local/lib/python2.7/test/test_file2k.pyRs(R(RR((Rs,/usr/local/lib/python2.7/test/test_file2k.pyttest_close_open_truncatescs fd}j|dS(NcsjjddS(NRI(R
R((R(s,/usr/local/lib/python2.7/test/test_file2k.pyRs(R(RR((Rs,/usr/local/lib/python2.7/test/test_file2k.pyttest_close_open_writescs fd}j|dS(NcsjjddS(NRI(R
R2((R(s,/usr/local/lib/python2.7/test/test_file2k.pyRs(R(RR((Rs,/usr/local/lib/python2.7/test/test_file2k.pyttest_close_open_writelinesscst|jd3}x)td
D]}|jdddq"WWdQXt|jd&fd}|j|d	WdQXdS(NRiit0i2s
R)csxD]}qWdS(N((R4(R
(s,/usr/local/lib/python2.7/test/test_file2k.pytits
i
i(R	RyRRR(RRRbR((R
s,/usr/local/lib/python2.7/test/test_file2k.pyttest_iteration_torturesc	st|jd3}x)tdD]}|jdddq"WWdQXt|jdCtdgdgd	fd
}|j|d	WdQXdS(NRi'Ri2s
R)iii
csOtr x<D]}qWn+x(tdD]}j|ddq-WdS(Nidi(RNRRQ(R4Rb(R
R(s,/usr/local/lib/python2.7/test/test_file2k.pytiterates

(R	RyRRRR(RRRbR((R
Rs,/usr/local/lib/python2.7/test/test_file2k.pyttest_iteration_seeks(R:R;RRRRRRRRRRRRRRRRRRRRRRRR(((s,/usr/local/lib/python2.7/test/test_file2k.pyRs0																					Rstest requires a posix system.tTestFileSignalEINTRcBsPeZedZedZdZedZdZdZdZ	RS(cCs|r!|jdd}d}nd}t|dksEtdd|dd	|}tjtjd
|gdtjdtjd
tj}|jj	d}|dkr|j
|jd|||jj	fn|jj
|d}	g}
x|
stj|jgddd\}
}}|jtjtjd|	d7}	|	dkr|j
|jd|qqW|jj}|dkr|j
|jd|||jj	fn|jdd\}
}|jdkr|jd||j|
|fndS(skGeneric buffered read method test harness to verify EINTR behavior.

        Also validates that Python signal handlers are run during the read.

        Args:
            data_to_write: String to write to the child process for reading
                before sending it a signal, confirming the signal was handled,
                writing a final newline char and closing the infile pipe.
            read_and_verify_code: Single "line" of code to read from a file
                object named 'infile' and validate the result.  This will be
                executed as part of a python subprocess fed data_to_write.
            method_name: The name of the read method being tested, for use in
                an error message on failure.
            universal_newlines: If True, infile will be opened in universal
                newline mode in the child process.
        s
s
s,infile = os.fdopen(sys.stdin.fileno(), "rU")sinfile = sys.stdinis#data_to_write must fit in pipe buf.s\import os, signal, sys ;signal.signal(signal.SIGINT, lambda s, f: sys.stderr.write("$\n")) ;s ;s<assert isinstance(infile, file) ;sys.stderr.write("Go.\n") ;s-cRtstdouttstderrisGo.
s-Error from %s process while awaiting "Go":
%sig?g?iis"failed to handle signal during %s.s$
s/Error from %s process while awaiting signal:
%stinputs0%s() process exited rc=%d.
STDOUT:
%s
STDERR:
%sN(((treplaceRqRt
subprocesstPopenRDt
executabletPIPERR3tkillRzRRtselecttsend_signaltsignaltSIGINTRRROtcommunicatet
returncode(Rt
data_to_writetread_and_verify_codetmethod_nametuniversal_newlinestinfile_setup_codet
child_codetreader_processtgotsignals_senttrlistRtsignal_lineRR((s,/usr/local/lib/python2.7/test/test_file2k.pyt
_test_readingsF		
		'



		c	Cs&|jddddddd|dS(	s4file.readline must handle signals and not lose data.Rs
hello, world!Rsline = infile.readline() ;expected_line = "hello, world!\n" ;assert line == expected_line, ("read %r expected %r" % (line, expected_line))RRORN(R(RR((s,/usr/local/lib/python2.7/test/test_file2k.pyt
test_readlines
	cCs|jdtdS(NR(RR(R((s,/usr/local/lib/python2.7/test/test_file2k.pyt%test_readline_with_universal_newlines
sc	Cs&|jddddddd|dS(	s5file.readlines must handle signals and not lose data.Rshello
world!Rslines = infile.readlines() ;expected_lines = ["hello\n", "world!\n"] ;assert lines == expected_lines, ("readlines returned wrong data.\n" "got lines %r\nexpected  %r" % (lines, expected_lines))RRPRN(R(RR((s,/usr/local/lib/python2.7/test/test_file2k.pyttest_readlines
s
	cCs|jdtdS(NR(RR(R((s,/usr/local/lib/python2.7/test/test_file2k.pyt&test_readlines_with_universal_newlinesscCs |jdddddddS(s<Unbounded file.read() must handle signals and not lose data.Rshello, world!abcdefghijklmRsdata = infile.read() ;expected_data = "hello, world!abcdefghijklm\n";assert data == expected_data, ("read %r expected %r" % (data, expected_data))Rsunbounded readN(R(R((s,/usr/local/lib/python2.7/test/test_file2k.pyttest_readalls	cCs |jdddddddS(s4file.readinto must handle signals and not lose data.Rs
hello, world!Rsdata = bytearray(50) ;num_read = infile.readinto(data) ;expected_data = "hello, world!\n";assert data[:num_read] == expected_data, ("read %r expected %r" % (data, expected_data))RR+N(R(R((s,/usr/local/lib/python2.7/test/test_file2k.pyt
test_readinto+s	(
R:R;RRRRRRRR(((s,/usr/local/lib/python2.7/test/test_file2k.pyRsO
			tStdoutTestscBs#eZdZdZdZRS(csHtjddfdY}z|t_dGHWdt_XdS(NtFilecseZfdZRS(csd|krt_ndS(Ns
(RDR(RRr(tsave_stdout(s,/usr/local/lib/python2.7/test/test_file2k.pyRAs(R:R;R((R"(s,/usr/local/lib/python2.7/test/test_file2k.pyR!@ss	some text((RDR(RR!((R"s,/usr/local/lib/python2.7/test/test_file2k.pyttest_move_stdout_on_write;s		cCsbtj}t`zByHWn)tk
rB}|jt|dnX|jdWd|t_XdS(Nslost sys.stdoutsExpected RuntimeError(RDRtRuntimeErrorRRaRz(RR"R|((s,/usr/local/lib/python2.7/test/test_file2k.pyttest_del_stdout_before_printKs	csddlfdfd}|ddd|ddd|dd	d
|ddd|dd
d|dddx7dD]/}ddd|d}j|dqWdS(Nics{dj|}tjj}||d<jtjd|gdjd|}|j\}}j	|j
d|S(Ns
tPYTHONIOENCODINGs-cRtenvi(RRtenvirontcopyRRDRRRRR
(tencodingtcodeR'tprocessRR(RR(s,/usr/local/lib/python2.7/test/test_file2k.pytget_message\s
cs-|dd|d}j||dS(Ns
import sysssys.stdout.write(%r)ssys.stdout.flush()(R(ttextR*texpectedR(R-R(s,/usr/local/lib/python2.7/test/test_file2k.pyt
check_messagefs
	u15€siso-8859-15s15sutf-8s15€s	utf-16-les15 siso-8859-1:ignoret15siso-8859-1:replaces15?siso-8859-1:backslashreplaces15\u20actbufferRptasciis
import sysssys.stdout.write(%s("\xe9"))ssys.stdout.flush()s(R2Rp(RR(RR0tobjtypeR((R-RRs,/usr/local/lib/python2.7/test/test_file2k.pyttest_unicodeYs

	(R:R;R#R%R5(((s,/usr/local/lib/python2.7/test/test_file2k.pyR 9s		cCsGztttttttWdtjj	t
rBtjt
nXdS(N(RRRtRRRR RRuRRR(((s,/usr/local/lib/python2.7/test/test_file2k.pyt	test_mains
t__main__(!RDRRRRR
RRRRtweakrefRRtImportErrorRttestRttest.test_supportRRRRtTestCaseRRtRRRRRR R6R:(((s,/usr/local/lib/python2.7/test/test_file2k.pyt<module>s:


G	


Zerion Mini Shell 1.0