config root man

Current Path : /compat/linux/proc/self/root/usr/local/lib/python2.5/test/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //compat/linux/proc/self/root/usr/local/lib/python2.5/test/test_subprocess.pyo

³ò
h”Rc@sÝddkZddklZddkZddkZddkZddkZddkZddkZddk	Z	ei
djZeo
dZndZd„Z
deifd„ƒYZd	„Zed
joeƒndS(iÿÿÿÿN(ttest_supporttwin32s@import msvcrt; msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY);tcCstidd|ƒS(Ns\[\d+ refs\]\r?\n?$R(tretsub(tstderr((s0/usr/local/lib/python2.5/test/test_subprocess.pytremove_stderr_debug_decorationsstProcessTestCasecBs7eZd„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„Zei i!dei"ƒƒo
d„Z#nd„Z$d „Z%d!„Z&d"„Z'd#„Z(d$„Z)d%„Z*d&„Z+d'„Z,d(„Z-e.p^d)„Z/d*„Z0d+„Z1d,„Z2d-„Z3d.„Z4d/„Z5d0„Z6d1„Z7d2„Z8ne.o:d3„Z9d4„Z:d5„Z5d6„Z6d7„Z7d8„Z8nRS(9cCs"ttdƒotiƒndS(Nt
reap_children(thasattrRR(tself((s0/usr/local/lib/python2.5/test/test_subprocess.pytsetUpscCs"ttdƒotiƒndS(NR(R	RR(R
((s0/usr/local/lib/python2.5/test/test_subprocess.pyttearDown$scCsNttdƒotiƒSn-tiƒ}ti|titiBƒ|fSdS(s?wrapper for mkstemp, calling mktemp if mkstemp is not availabletmkstempN(R	ttempfileR
tmktemptostopentO_RDWRtO_CREAT(R
tfname((s0/usr/local/lib/python2.5/test/test_subprocess.pyR
*scCs/titiddgƒ}|i|dƒdS(Ns-csimport sys; sys.exit(47)i/(t
subprocesstcalltsyst
executabletassertEqual(R
trc((s0/usr/local/lib/python2.5/test/test_subprocess.pyt
test_call_seq5scCs/titiddgƒ}|i|dƒdS(Ns-csimport sys; sys.exit(0)i(Rt
check_callRRR(R
R((s0/usr/local/lib/python2.5/test/test_subprocess.pyttest_check_call_zero;scCs\ytitiddgƒWn+tij
o}|i|idƒnX|idƒdS(Ns-csimport sys; sys.exit(47)i/sExpected CalledProcessError(RRRRtCalledProcessErrorRt
returncodetfail(R
te((s0/usr/local/lib/python2.5/test/test_subprocess.pyttest_check_call_nonzeroAscCsNtiiƒ}d|d<titiddgd|ƒ}|i|dƒdS(NtbananatFRUITs-cs5import sys, os;sys.exit(os.getenv("FRUIT")=="banana")tenvi(RtenvirontcopyRRRRR(R
tnewenvR((s0/usr/local/lib/python2.5/test/test_subprocess.pyttest_call_kwargsKs
		cCsNtitiddgdtidtiƒ}|iƒ|i|idƒdS(Ns-csprint "banana"tstdoutR(	RtPopenRRtPIPEtwaitRtstdintNone(R
tp((s0/usr/local/lib/python2.5/test/test_subprocess.pyttest_stdin_noneUs
cCsNtitiddgdtidtiƒ}|iƒ|i|idƒdS(Ns-csRprint "    this bit of output is from a test of stdout in a different process ..."R.R(	RR+RRR,R-RR*R/(R
R0((s0/usr/local/lib/python2.5/test/test_subprocess.pyttest_stdout_none\s
	
cCsNtitiddgdtidtiƒ}|iƒ|i|idƒdS(Ns-csprint "banana"R.R*(	RR+RRR,R-RRR/(R
R0((s0/usr/local/lib/python2.5/test/test_subprocess.pyttest_stderr_nonefs
cCsBtidddgdtiƒ}|iƒ|i|idƒdS(Ntsomethingyoudonthaves-csimport sys; sys.exit(47)Ri/(RR+RRR-RR(R
R0((s0/usr/local/lib/python2.5/test/test_subprocess.pyttest_executablems
	
cCsbtitiddgdtiƒ}|iidƒ|iiƒ|iƒ|i	|i
dƒdS(Ns-cs0import sys; sys.exit(sys.stdin.read() == "pear")R.tpeari(RR+RRR,R.twritetcloseR-RR(R
R0((s0/usr/local/lib/python2.5/test/test_subprocess.pyttest_stdin_pipets	

cCs}tiƒ}|iƒ}ti|dƒti|ddƒtiti	ddgd|ƒ}|i
ƒ|i|idƒdS(NR6is-cs0import sys; sys.exit(sys.stdin.read() == "pear")R.i(
Rt
TemporaryFiletfilenoRR7tlseekRR+RRR-RR(R
ttftdR0((s0/usr/local/lib/python2.5/test/test_subprocess.pyttest_stdin_filedes~s		
cCshtiƒ}|idƒ|idƒtitiddgd|ƒ}|iƒ|i	|i
dƒdS(NR6is-cs0import sys; sys.exit(sys.stdin.read() == "pear")R.i(RR:R7tseekRR+RRR-RR(R
R=R0((s0/usr/local/lib/python2.5/test/test_subprocess.pyttest_stdin_fileobjŠs

		
cCsAtitiddgdtiƒ}|i|iiƒdƒdS(Ns-cs&import sys; sys.stdout.write("orange")R*torange(RR+RRR,RR*tread(R
R0((s0/usr/local/lib/python2.5/test/test_subprocess.pyttest_stdout_pipe•s	cCsvtiƒ}|iƒ}titiddgd|ƒ}|iƒti	|ddƒ|i
ti|dƒdƒdS(Ns-cs&import sys; sys.stdout.write("orange")R*iiRB(RR:R;RR+RRR-RR<RRC(R
R=R>R0((s0/usr/local/lib/python2.5/test/test_subprocess.pyttest_stdout_filedesœs		
cCs^tiƒ}titiddgd|ƒ}|iƒ|idƒ|i|i	ƒdƒdS(Ns-cs&import sys; sys.stdout.write("orange")R*iRB(
RR:RR+RRR-R@RRC(R
R=R0((s0/usr/local/lib/python2.5/test/test_subprocess.pyttest_stdout_fileobj§s		

cCsGtitiddgdtiƒ}|it|iiƒƒdƒdS(Ns-cs*import sys; sys.stderr.write("strawberry")Rt
strawberry(	RR+RRR,RRRRC(R
R0((s0/usr/local/lib/python2.5/test/test_subprocess.pyttest_stderr_pipe±s
	cCs|tiƒ}|iƒ}titiddgd|ƒ}|iƒti	|ddƒ|i
tti|dƒƒdƒdS(Ns-cs*import sys; sys.stderr.write("strawberry")RiiRG(
RR:R;RR+RRR-RR<RRRC(R
R=R>R0((s0/usr/local/lib/python2.5/test/test_subprocess.pyttest_stderr_filedes¹s		
cCsdtiƒ}titiddgd|ƒ}|iƒ|idƒ|it	|i
ƒƒdƒdS(Ns-cs*import sys; sys.stderr.write("strawberry")RiRG(RR:RR+RRR-R@RRRC(R
R=R0((s0/usr/local/lib/python2.5/test/test_subprocess.pyttest_stderr_fileobjÅs		

cCs\titiddgdtidtiƒ}|iiƒ}t|ƒ}|i	|dƒdS(Ns-csRimport sys;sys.stdout.write("apple");sys.stdout.flush();sys.stderr.write("orange")R*Rtappleorange(
RR+RRR,tSTDOUTR*RCRR(R
R0toutputtstripped((s0/usr/local/lib/python2.5/test/test_subprocess.pyttest_stdout_stderr_pipeÐs		cCsvtiƒ}titiddgd|d|ƒ}|iƒ|idƒ|iƒ}t	|ƒ}|i
|dƒdS(Ns-csRimport sys;sys.stdout.write("apple");sys.stdout.flush();sys.stderr.write("orange")R*RiRK(RR:RR+RRR-R@RCRR(R
R=R0RMRN((s0/usr/local/lib/python2.5/test/test_subprocess.pyttest_stdout_stderr_fileÝs		

cCs;d}titid|gddƒ}|i|dƒdS(Ns>import sys, os; sys.exit(os.write(sys.stdout.fileno(), '.\n'))s-cR*ii(RRRRtassertEquals(R
tcmdR((s0/usr/local/lib/python2.5/test/test_subprocess.pyttest_stdout_filedes_of_stdoutís!cCs£tiddƒ}tiƒ}ti|ƒtiƒ}ti|ƒtitiddgdtid|ƒ}ti	i
}|i||ii
ƒƒ||ƒƒdS(NtTEMPs/tmps-cs+import sys,os;sys.stdout.write(os.getcwd())R*tcwd(RtgetenvtgetcwdtchdirRR+RRR,tpathtnormcaseRR*RC(R
ttmpdirRUR0RZ((s0/usr/local/lib/python2.5/test/test_subprocess.pyttest_cwdós

			cCs`tiiƒ}d|d<titiddgdtid|ƒ}|i|i	i
ƒdƒdS(NRBR$s-cs2import sys,os;sys.stdout.write(os.getenv("FRUIT"))R*R%(RR&R'RR+RRR,RR*RC(R
R(R0((s0/usr/local/lib/python2.5/test/test_subprocess.pyttest_envs
			cCsHtitiddgdtiƒ}|idƒ|i|idƒdS(Ns-cs0import sys; sys.exit(sys.stdin.read() == "pear")R.R6i(RR+RRR,tcommunicateRR(R
R0((s0/usr/local/lib/python2.5/test/test_subprocess.pyttest_communicate_stdin
s
	
cCsZtitiddgdtiƒ}|iƒ\}}|i|dƒ|i|dƒdS(Ns-cs)import sys; sys.stdout.write("pineapple")R*t	pineapple(RR+RRR,R^RR/(R
R0R*R((s0/usr/local/lib/python2.5/test/test_subprocess.pyttest_communicate_stdouts	cCs`titiddgdtiƒ}|iƒ\}}|i|dƒ|i|i	dƒƒdS(Ns-cs)import sys; sys.stderr.write("pineapple")RR`(
RR+RRR,R^RR/tassert_t
startswith(R
R0R*R((s0/usr/local/lib/python2.5/test/test_subprocess.pyttest_communicate_stderrs	cCsutitiddgdtidtidtiƒ}|idƒ\}}|i|dƒ|it|ƒdƒdS(Ns-csNimport sys,os;sys.stderr.write("pineapple");sys.stdout.write(sys.stdin.read())R.R*RR#R`(RR+RRR,R^RR(R
R0R*R((s0/usr/local/lib/python2.5/test/test_subprocess.pyttest_communicate&s			s/proc/%d/fdcCs¤dtiƒ}tti|ƒƒ}titiddgdtiƒ}|i	ƒtti|ƒƒ}~tti|ƒƒ}|i
||ƒ|i
||ƒdS(Ns/proc/%d/fds-csprint()R*(RtgetpidtlentlistdirRR+RRR,R^R(R
tfd_directorytnum_fds_before_popenR0tnum_fds_after_communicatetnum_fds_after_destruction((s0/usr/local/lib/python2.5/test/test_subprocess.pyttest_communicate_pipe_fd_leak7s
cCsQtitiddgƒ}|iƒ\}}|i|dƒ|i|dƒdS(Ns-csimport sys; sys.exit(47)(RR+RRR^RR/(R
R0R*R((s0/usr/local/lib/python2.5/test/test_subprocess.pyttest_communicate_returnsCs
cCs¼tiƒ\}}to
d}nti|dƒ}ti|ƒti|ƒtitidd|gdti	dti	dti	ƒ}d|}|i
|ƒ\}}|i||ƒdS(	NitPC_PIPE_BUFs-cspimport sys,os;sys.stdout.write(sys.stdin.read(47));sys.stderr.write("xyz"*%d);sys.stdout.write(sys.stdin.read())R.R*Rtabc(Rtpipet	mswindowst	fpathconfR8RR+RRR,R^R(R
txtytpipe_bufR0tstring_to_writeR*R((s0/usr/local/lib/python2.5/test/test_subprocess.pyttest_communicate_pipe_bufKs



		
cCs…titiddgdtidtidtiƒ}|iidƒ|idƒ\}}|i|dƒ|it	|ƒd	ƒdS(
Ns-cs0import sys,os;sys.stdout.write(sys.stdin.read())R.R*RR#tsplittbananasplitR(
RR+RRR,R.R7R^RR(R
R0R*R((s0/usr/local/lib/python2.5/test/test_subprocess.pyttest_writes_before_communicatebs			cCsytitiddtdgdtiddƒ}|iiƒ}tt	dƒo|i
|dƒn|i
|d	ƒdS(
Ns-csimport sys,os;s	sys.stdout.write("line1\n");sys.stdout.flush();sys.stdout.write("line2\r");sys.stdout.flush();sys.stdout.write("line3\r\n");sys.stdout.flush();sys.stdout.write("line4\r");sys.stdout.flush();sys.stdout.write("\nline5");sys.stdout.flush();sys.stdout.write("\nline6");R*tuniversal_newlinesitnewliness#line1
line2
line3
line4
line5
line6s%line1
line2
line3
line4
line5
line6(RR+RRt	SETBINARYR,R*RCR	tfileR(R
R0R*((s0/usr/local/lib/python2.5/test/test_subprocess.pyttest_universal_newlinesos
				cCs…titiddtdgdtidtiddƒ}|iƒ\}}ttdƒo|i	|d	ƒn|i	|d
ƒdS(Ns-csimport sys,os;s	sys.stdout.write("line1\n");sys.stdout.flush();sys.stdout.write("line2\r");sys.stdout.flush();sys.stdout.write("line3\r\n");sys.stdout.flush();sys.stdout.write("line4\r");sys.stdout.flush();sys.stdout.write("\nline5");sys.stdout.flush();sys.stdout.write("\nline6");R*RR|iR}s#line1
line2
line3
line4
line5
line6s%line1
line2
line3
line4
line5
line6(
RR+RRR~R,R^R	RR(R
R0R*R((s0/usr/local/lib/python2.5/test/test_subprocess.pyt#test_universal_newlines_communicate‰s
		c	Cs­ttdƒptidƒoto
d}nd}xmt|ƒD]_}titiddgdti	dti	d	ti	ƒ}|i
d
ƒd}|i|d
ƒqFWdS(Ntis_resource_enabledRiiAs-cs-import sys;sys.stdout.write(sys.stdin.read())R.R*Rtlimei(R	RR‚RrtrangeRR+RRR,R^R(R
tmax_handlestiR0tdata((s0/usr/local/lib/python2.5/test/test_subprocess.pyttest_no_leaking£s

			cCsï|itidddgƒdƒ|itidddgƒdƒ|itidd	d
gƒdƒ|itidd
dgƒdƒ|itidddgƒdƒ|itidddgƒdƒ|itiddgƒdƒdS(Nsa b cR>R!s"a b c" d esab"cs\s	ab\"c \ dsa\\\bsde fgthsa\\\b "de fg" hsa\"btcs
a\\\"b c dsa\\b cs"a\\b c" d esa\\b\ cs
"a\\b\ c" d etabRsab ""(RRtlist2cmdline(R
((s0/usr/local/lib/python2.5/test/test_subprocess.pyttest_list2cmdline´scCs€titiddgƒ}d}x/|iƒdjotidƒ|d7}q$W|i|djƒ|i	|iƒdƒdS(Ns-csimport time; time.sleep(1)igš™™™™™¹?ii(
RR+RRtpollR/ttimetsleepRbR(R
R0tcount((s0/usr/local/lib/python2.5/test/test_subprocess.pyt	test_pollÅs
cCsKtitiddgƒ}|i|iƒdƒ|i|iƒdƒdS(Ns-csimport time; time.sleep(2)i(RR+RRRR-(R
R0((s0/usr/local/lib/python2.5/test/test_subprocess.pyt	test_waitÕscCsGy titiddgdƒWntj
onX|idƒdS(Ns-ctpassRBsExpected TypeError(RR+RRt	TypeErrorR (R
((s0/usr/local/lib/python2.5/test/test_subprocess.pyttest_invalid_bufsizeÝs
 cCsjy%titiddgddƒ}Wn1tj
o%}|i|iidƒdƒnX|idƒdS(Ns-cRRUs/this/path/does/not/existsos.chdiriÿÿÿÿsExpected OSError(	RR+RRtOSErrortassertNotEqualtchild_tracebacktfindR (R
R0R!((s0/usr/local/lib/python2.5/test/test_subprocess.pyttest_exceptionsës
!cCscy9ddk}|i|iƒ}|i|idƒ|SWn#tt|ifj
odSnXdS(sxTry to prevent core files from being created.
            Returns previous ulimit if successful, else None.
            iÿÿÿÿNi(ii(tresourcet	getrlimittRLIMIT_COREt	setrlimittImportErrort
ValueErrorterrorR/(R
Rœt	old_limit((s0/usr/local/lib/python2.5/test/test_subprocess.pyt_suppress_core_files÷scCsb|djodSny#ddk}|i|i|ƒWn#tt|ifj
odSnXdS(s%Return core file behavior to default.Niÿÿÿÿ(R/RœRŸRžR R¡R¢(R
R£Rœ((s0/usr/local/lib/python2.5/test/test_subprocess.pyt_unsuppress_core_filess
cCsa|iƒ}ztitiddgƒ}Wd|i|ƒX|iƒ|i|it	i
ƒdS(Ns-csimport os; os.abort()(R¤RR+RRR¥R-RRtsignaltSIGABRT(R
R£R0((s0/usr/local/lib/python2.5/test/test_subprocess.pyttest_run_abort
s
cCsJtitiddgdtidd„ƒ}|i|iiƒdƒdS(Ns-cs2import sys,os;sys.stdout.write(os.getenv("FRUIT"))R*t
preexec_fncSstiddƒS(R$tapple(Rtputenv(((s0/usr/local/lib/python2.5/test/test_subprocess.pyt<lambda>sRª(RR+RRR,RR*RC(R
R0((s0/usr/local/lib/python2.5/test/test_subprocess.pyttest_preexecs
		cCs“|iƒ\}}ti|dƒti|dtiƒti|ƒti|dƒti|ƒ}|i	ƒti
|ƒ|i|idƒdS(Ns
#!/bin/sh
s&exec %s -c 'import sys; sys.exit(47)'
iÀi/(
R
RR7RRR8tchmodRR+R-tremoveRR(R
tfRR0((s0/usr/local/lib/python2.5/test/test_subprocess.pyttest_args_string!s


cCsT|ittitiddgddƒ|ittitiddgddƒdS(Ns-csimport sys; sys.exit(47)tstartupinfoi/t
creationflags(tassertRaisesR¡RRRR(R
((s0/usr/local/lib/python2.5/test/test_subprocess.pyttest_invalid_args.scCsctiiƒ}d|d<tidgdddtid|ƒ}|i|iiƒi	ƒdƒdS(NRªR$secho $FRUITtshelliR*R%(
RR&R'RR+R,RR*RCtstrip(R
R(R0((s0/usr/local/lib/python2.5/test/test_subprocess.pyttest_shell_sequence9s
		cCs`tiiƒ}d|d<tiddddtid|ƒ}|i|iiƒi	ƒdƒdS(NRªR$secho $FRUITR¶iR*R%(
RR&R'RR+R,RR*RCR·(R
R(R0((s0/usr/local/lib/python2.5/test/test_subprocess.pyttest_shell_stringBs
		cCs†|iƒ\}}ti|dƒti|dtiƒti|ƒti|dƒti|ƒ}ti	|ƒ|i
|dƒdS(Ns
#!/bin/sh
s&exec %s -c 'import sys; sys.exit(47)'
iÀi/(R
RR7RRR8R®RRR¯R(R
R°RR((s0/usr/local/lib/python2.5/test/test_subprocess.pyttest_call_stringKs

cCsMd}d}tiƒ}||_||_titiddgd|ƒdS(Niis-csimport sys; sys.exit(0)R²(RtSTARTUPINFOtdwFlagstwShowWindowRRR(R
tSTARTF_USESHOWWINDOWtSW_MAXIMIZER²((s0/usr/local/lib/python2.5/test/test_subprocess.pyttest_startupinfo\s		cCs4d}tiidƒtitidd|ƒdS(Nis'    a DOS box should flash briefly ...
s# -c "import time; time.sleep(0.25)"R³(RRR7RRR(R
tCREATE_NEW_CONSOLE((s0/usr/local/lib/python2.5/test/test_subprocess.pyttest_creationflagsks
cCsW|ittitiddgdd„ƒ|ittitiddgdtƒdS(Ns-csimport sys; sys.exit(47)R©cSsdS(i((((s0/usr/local/lib/python2.5/test/test_subprocess.pyR¬xst	close_fds(R´R¡RRRRtTrue(R
((s0/usr/local/lib/python2.5/test/test_subprocess.pyRµss
cCsftiiƒ}d|d<tidgdddtid|ƒ}|i|iiƒi	dƒdƒdS(	NtphysalisR$tsetR¶iR*R%iÿÿÿÿ(
RR&R'RR+R,R˜R*RCRš(R
R(R0((s0/usr/local/lib/python2.5/test/test_subprocess.pyR¸~s
		cCsctiiƒ}d|d<tiddddtid|ƒ}|i|iiƒi	dƒdƒdS(	NRÅR$RÆR¶iR*R%iÿÿÿÿ(
RR&R'RR+R,R˜R*RCRš(R
R(R0((s0/usr/local/lib/python2.5/test/test_subprocess.pyR¹‡s
		cCs*titidƒ}|i|dƒdS(Ns -c "import sys; sys.exit(47)"i/(RRRRR(R
R((s0/usr/local/lib/python2.5/test/test_subprocess.pyRºs
(;t__name__t
__module__RRR
RRR"R)R1R2R3R5R9R?RARDRERFRHRIRJRORPRSR\R]R_RaRdReRRYtisdirRfRmRnRxR{R€RRˆRR’R“R–RrR›R¤R¥R¨R­R±RµR¸R¹RºRÀRÂ(((s0/usr/local/lib/python2.5/test/test_subprocess.pyRsv						
	
		
			
					
				
				
			
	
			
							
			
				
					
							cCs/titƒttdƒotiƒndS(NR(Rtrun_unittestRR	R(((s0/usr/local/lib/python2.5/test/test_subprocess.pyt	test_main—s
t__main__(tunittestttestRRRR¦RRRRtplatformRrR~RtTestCaseRRËRÇ(((s0/usr/local/lib/python2.5/test/test_subprocess.pys<module>s&
	ÿÿ|	


Man Man