%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_subprocess.pyo

ó
Nêáac@sÔddlZddlmZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
yddlZWnek
rÉeZn
XddlZyddlZWnek
rÿeZnXyddlZWnek
r)eZnXyddlZWnek
rSeZnXejdkZerrdZndZdejfd„ƒYZdefd	„ƒYZd
ejfd„ƒYZdefd
„ƒYZdefd„ƒYZej edƒdefd„ƒYƒZ!ej"edƒdefd„ƒYƒZ#ej"e$ede%ƒdƒdefd„ƒYƒZ&dejfd„ƒYZ'ej"edƒdefd„ƒYƒZ(d„Z)e*d krÐe)ƒndS(!iÿÿÿÿN(ttest_supporttwin32s@import msvcrt; msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY);ttBaseTestCasecBs&eZd„Zd„Zdd„ZRS(cCstjƒdS(N(Rt
reap_children(tself((s0/usr/local/lib/python2.7/test/test_subprocess.pytsetUp2scCsSxtjD]}|jƒq
Wtjƒ|jtjdƒ|jƒtjƒdS(Nssubprocess._active not empty(t
subprocesst_activetwaitt_cleanuptassertFalset
doCleanupsRR(Rtinst((s0/usr/local/lib/python2.7/test/test_subprocess.pyttearDown7s

cCs,tjdd|ƒ}|j|||ƒdS(Ns\[\d+ refs\]\r?\n?$R(tretsubtassertEqual(Rtstderrtexpectedtmsgtactual((s0/usr/local/lib/python2.7/test/test_subprocess.pytassertStderrEqual?sN(t__name__t
__module__RRtNoneR(((s0/usr/local/lib/python2.7/test/test_subprocess.pyR1s		tPopenTestExceptioncBseZRS((RR(((s0/usr/local/lib/python2.7/test/test_subprocess.pyRGstPopenExecuteChildRaisescBseZdZd„ZRS(sePopen subclass for testing cleanup of subprocess.PIPE filehandles when
    _execute_child fails.
    cOstdƒ‚dS(NsForced Exception for Test(R(Rtargstkwargs((s0/usr/local/lib/python2.7/test/test_subprocess.pyt_execute_childOs(RRt__doc__R(((s0/usr/local/lib/python2.7/test/test_subprocess.pyRKstProcessTestCasecBs\eZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z	d„Z
d	„Zd
„Zd„Z
d„Zejejƒd
ƒd„ƒZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z!d„Z"d„Z#d„Z$d „Z%d!„Z&d"„Z'd#„Z(ej)e*j+j,d$e*j-ƒƒd%ƒd&„ƒZ.d'„Z/d(„Z0d)„Z1d*„Z2d+„Z3d,„Z4d-„Z5d.„Z6d/„Z7d0„Z8d1„Z9eje:d8kd2ƒd3„ƒZ<d4„Z=d5„Z>d6„Z?ej)e*j+j,d$e*j-ƒƒd%ƒd7„ƒZ@RS(9cCs/tjtjddgƒ}|j|dƒdS(Ns-csimport sys; sys.exit(47)i/(Rtcalltsyst
executableR(Rtrc((s0/usr/local/lib/python2.7/test/test_subprocess.pyt
test_call_seqUscCs/tjtjddgƒ}|j|dƒdS(Ns-csimport sys; sys.exit(0)i(Rt
check_callR"R#R(RR$((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_check_call_zero[scCsN|jtjƒ }tjtjddgƒWdQX|j|jjdƒdS(Ns-csimport sys; sys.exit(47)i/(	tassertRaisesRtCalledProcessErrorR&R"R#Rt	exceptiont
returncode(Rtc((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_check_call_nonzeroascCs/tjtjddgƒ}|jd|ƒdS(Ns-csprint 'BDFL'tBDFL(Rtcheck_outputR"R#tassertIn(Rtoutput((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_check_outputhscCsN|jtjƒ }tjtjddgƒWdQX|j|jjdƒdS(Ns-csimport sys; sys.exit(5)i(	R(RR)R/R"R#RR*R+(RR,((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_check_output_nonzeronscCs8tjtjddgdtjƒ}|jd|ƒdS(Ns-cs$import sys; sys.stderr.write('BDFL')RR.(RR/R"R#tSTDOUTR0(RR1((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_check_output_stderruscCsg|jtƒ8}tjtjddgdtjƒ}|jdƒWdQX|jd|j	j
dƒdS(Ns-csprint 'will not be run'tstdouts-Expected ValueError when stdout arg supplied.i(R(t
ValueErrorRR/R"R#R6tfailR0R*R(RR,R1((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_check_output_stdout_arg|scCsNtjjƒ}d|d<tjtjddgd|ƒ}|j|dƒdS(NtbananatFRUITs-cs5import sys, os;sys.exit(os.getenv("FRUIT")=="banana")tenvi(tostenvirontcopyRR!R"R#R(RtnewenvR$((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_call_kwargs…s
		c	CstjƒY}|jttjddƒtjjjj}dg|d}|jttj|ŒWdQX|j	|j
ƒdƒdS(Ntinvalid_arg_nameiiR(Rtcaptured_stderrR(t	TypeErrorRtPopent__init__t__code__tco_argcountRtgetvalue(Rtstargcountt
too_many_args((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_invalid_argsscCsttjtjddgdtjdtjƒ}|j|jjƒ|j|jjƒ|j	ƒ|j
|jdƒdS(Ns-csprint "banana"R6R(
RRER"R#tPIPEt
addCleanupR6tcloseRR	RtstdinR(Rtp((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_stdin_none™s
cCs›d}tjtjd|gdtjdtjƒ}|j|jjƒ|j|jjƒ|j	ƒ\}}|j
|jd|ƒ|j
|jƒdƒdS(Ns±import sys; from subprocess import Popen, PIPE;p = Popen([sys.executable, "-c", "print 'test_stdout_none'"],          stdin=PIPE, stderr=PIPE);p.wait(); assert p.stdout is None;s-cR6Rittest_stdout_none(
RRER"R#RNROR6RPRtcommunicateRR+trstrip(RtcodeRRtoutterr((s0/usr/local/lib/python2.7/test/test_subprocess.pyRT¢scCsttjtjddgdtjdtjƒ}|j|jjƒ|j|jjƒ|j	ƒ|j
|jdƒdS(Ns-csprint "banana"RQR6(
RRER"R#RNROR6RPRQR	RRR(RRR((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_stderr_none¹s
cCsitjjtjjtjƒƒ}tjdddgdtjd|ƒ}|jƒ|j	|j
dƒdS(Ntsomethingyoudonthaves-csimport sys; sys.exit(47)R#tcwdi/(R=tpathtdirnametrealpathR"R#RRER	RR+(Rt
python_dirRR((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_executable_with_cwdÂs!	
s#need an installed Python. See #7774cCsBtjdddgdtjƒ}|jƒ|j|jdƒdS(NR[s-csimport sys; sys.exit(47)R#i/(RRER"R#R	RR+(RRR((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_executable_without_cwdÊs
	
cCsbtjtjddgdtjƒ}|jjdƒ|jjƒ|jƒ|j	|j
dƒdS(Ns-cs0import sys; sys.exit(sys.stdin.read() == "pear")RQtpeari(RRER"R#RNRQtwriteRPR	RR+(RRR((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_stdin_pipeÕs	

cCs}tjƒ}|jƒ}tj|dƒtj|ddƒtjtj	ddgd|ƒ}|j
ƒ|j|jdƒdS(NRcis-cs0import sys; sys.exit(sys.stdin.read() == "pear")RQi(
ttempfilet
TemporaryFiletfilenoR=RdtlseekRRER"R#R	RR+(RttftdRR((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_stdin_filedesßs		
cCshtjƒ}|jdƒ|jdƒtjtjddgd|ƒ}|jƒ|j	|j
dƒdS(NRcis-cs0import sys; sys.exit(sys.stdin.read() == "pear")RQi(RfRgRdtseekRRER"R#R	RR+(RRjRR((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_stdin_fileobjës

		
cCsTtjtjddgdtjƒ}|j|jjƒ|j|jj	ƒdƒdS(Ns-cs&import sys; sys.stdout.write("orange")R6torange(
RRER"R#RNROR6RPRtread(RRR((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_stdout_pipeös
	cCsvtjƒ}|jƒ}tjtjddgd|ƒ}|jƒtj	|ddƒ|j
tj|dƒdƒdS(Ns-cs&import sys; sys.stdout.write("orange")R6iiRo(RfRgRhRRER"R#R	R=RiRRp(RRjRkRR((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_stdout_filedesþs		
cCs^tjƒ}tjtjddgd|ƒ}|jƒ|jdƒ|j|j	ƒdƒdS(Ns-cs&import sys; sys.stdout.write("orange")R6iRo(
RfRgRRER"R#R	RmRRp(RRjRR((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_stdout_fileobj	s		

cCsTtjtjddgdtjƒ}|j|jjƒ|j|jj	ƒdƒdS(Ns-cs*import sys; sys.stderr.write("strawberry")Rt
strawberry(
RRER"R#RNRORRPRRp(RRR((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_stderr_pipes
	cCsvtjƒ}|jƒ}tjtjddgd|ƒ}|jƒtj	|ddƒ|j
tj|dƒdƒdS(Ns-cs*import sys; sys.stderr.write("strawberry")RiiRt(RfRgRhRRER"R#R	R=RiRRp(RRjRkRR((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_stderr_filedess		
cCs^tjƒ}tjtjddgd|ƒ}|jƒ|jdƒ|j|j	ƒdƒdS(Ns-cs*import sys; sys.stderr.write("strawberry")RiRt(
RfRgRRER"R#R	RmRRp(RRjRR((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_stderr_fileobj&s		

cCsvtjtjddgdtjdtjƒ}|jƒ\}}|j|dƒ|j|dƒ|j|jdƒdS(Ns-cs›import sys, subprocess;rc = subprocess.call([sys.executable, "-c",    "import sys;"    "sys.stderr.write('42')"],    stderr=subprocess.STDOUT);sys.exit(rc)R6Rt42Ri(	RRER"R#RNRURRR+(RRRR6R((s0/usr/local/lib/python2.7/test/test_subprocess.pyt,test_stderr_redirect_with_no_stdout_redirect0s		cCs]tjtjddgdtjdtjƒ}|j|jjƒ|j	|jj
ƒdƒdS(Ns-csRimport sys;sys.stdout.write("apple");sys.stdout.flush();sys.stderr.write("orange")R6Rtappleorange(RRER"R#RNR4ROR6RPRRp(RRR((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_stdout_stderr_pipeEs		cCsdtjƒ}tjtjddgd|d|ƒ}|jƒ|jdƒ|j|j	ƒdƒdS(Ns-csRimport sys;sys.stdout.write("apple");sys.stdout.flush();sys.stderr.write("orange")R6RiRz(
RfRgRRER"R#R	RmRRp(RRjRR((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_stdout_stderr_fileQs		

cCs›d}tjtjd|gdtjdtjƒ}|j|jjƒ|j|jjƒ|j	ƒ\}}|j
|jd|ƒ|j
|jƒdƒdS(Ns´import sys, subprocess; rc = subprocess.call([sys.executable, "-c",     "import os, sys; sys.exit(os.write(sys.stdout.fileno(), 'test with stdout=1'))"], stdout=1); assert rc == 18s-cR6Ristest with stdout=1(
RRER"R#RNROR6RPRRURR+RV(RRWRRRXRY((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_stdout_filedes_of_stdout_scCs°tjƒ}tjƒ}tj|ƒtjƒ}tj|ƒtjtjddgdtj	d|ƒ}|j
|jjƒtj
j}|j||jjƒƒ||ƒƒdS(Ns-cs+import sys,os;sys.stdout.write(os.getcwd())R6R\(Rft
gettempdirR=tgetcwdtchdirRRER"R#RNROR6RPR]tnormcaseRRp(RttmpdirR\RRR((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_cwdrs

			cCsstjjƒ}d|d<tjtjddgdtjd|ƒ}|j|j	j
ƒ|j|j	jƒdƒdS(NRoR;s-cs2import sys,os;sys.stdout.write(os.getenv("FRUIT"))R6R<(
R=R>R?RRER"R#RNROR6RPRRp(RR@RR((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_envƒs
			c	Csltjd}|jtƒtj|ddgƒWdQX|jtƒtjtjddgƒWdQXdS(Nss-ctpassspass#(R"R#R(RDRRE(Rtcmd((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_invalid_cmdŽs

c
CsStjjƒ}d|d<|jtƒ$tjtjddgd|ƒWdQXtjjƒ}d|d<|jtƒ$tjtjddgd|ƒWdQXtjjƒ}d|d	<|jt	ƒ$tjtjddgd|ƒWdQXtjjƒ}d
|d<tjtjddgdtj
d|ƒ}|jƒ\}}|j|d
ƒdS(
NtcabbagesFRUITVEGETABLEs-cR…R<sorangeVEGETABLE=cabbageR;tlemonsFRUIT=ORANGEsorange=lemons3import sys, os;sys.stdout.write(os.getenv("FRUIT"))R6(
R=R>R?R(RDRRER"R#R7RNRUR(RR@RRR6R((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_invalid_env˜s(
%
%
%
			cCsHtjtjddgdtjƒ}|jdƒ|j|jdƒdS(Ns-cs/import sys;sys.exit(sys.stdin.read() == "pear")RQRci(RRER"R#RNRURR+(RRR((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_communicate_stdin¶s
	
cCsZtjtjddgdtjƒ}|jƒ\}}|j|dƒ|j|dƒdS(Ns-cs)import sys; sys.stdout.write("pineapple")R6t	pineapple(RRER"R#RNRURR(RRRR6R((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_communicate_stdout¾s	cCsZtjtjddgdtjƒ}|jƒ\}}|j|dƒ|j|dƒdS(Ns-cs)import sys; sys.stderr.write("pineapple")RRŒ(	RRER"R#RNRURRR(RRRR6R((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_communicate_stderrÆs	cCs¨tjtjddgdtjdtjdtjƒ}|j|jjƒ|j|jjƒ|j|j	jƒ|j
dƒ\}}|j|dƒ|j|dƒdS(Ns-csNimport sys,os;sys.stderr.write("pineapple");sys.stdout.write(sys.stdin.read())RQR6RR:RŒ(
RRER"R#RNROR6RPRRQRURR(RRRR6R((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_communicateÎs			s/proc/%d/fdsLinux specificcCs¤dtjƒ}ttj|ƒƒ}tjtjddgdtjƒ}|j	ƒttj|ƒƒ}~ttj|ƒƒ}|j
||ƒ|j
||ƒdS(Ns/proc/%d/fds-cs	print('')R6(R=tgetpidtlentlistdirRRER"R#RNRUR(Rtfd_directorytnum_fds_before_popenRRtnum_fds_after_communicatetnum_fds_after_destruction((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_communicate_pipe_fd_leakßs
cCsQtjtjddgƒ}|jƒ\}}|j|dƒ|j|dƒdS(Ns-csimport sys; sys.exit(47)(RRER"R#RURR(RRRR6R((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_communicate_returnsîs
cCsótjƒ\}}tr!d}ntj|dƒ}tj|ƒtj|ƒtjtjdd|gdtj	dtj	dtj	ƒ}|j
|jjƒ|j
|jjƒ|j
|j
jƒd|}|j|ƒ\}}|j||ƒ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())RQR6Rtabc(R=tpipet	mswindowst	fpathconfRPRRER"R#RNROR6RRQRUR(Rtxtytpipe_bufRRtstring_to_writeR6R((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_communicate_pipe_bufös$	


		
cCs¸tjtjddgdtjdtjdtjƒ}|j|jjƒ|j|jjƒ|j|j	jƒ|j	j
dƒ|jdƒ\}}|j|dƒ|j
|d	ƒdS(
Ns-cs0import sys,os;sys.stdout.write(sys.stdin.read())RQR6RR:tsplittbananasplitR(RRER"R#RNROR6RPRRQRdRURR(RRRR6R((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_writes_before_communicates			cCsŠtjtjddtdgdtjddƒ}|j|jjƒ|jj	ƒ}t
tdƒrv|j|dƒn|j|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");R6tuniversal_newlinesitnewliness#line1
line2
line3
line4
line5
line6s%line1
line2
line3
line4
line5
line6(
RRER"R#t	SETBINARYRNROR6RPRpthasattrtfileR(RRRR6((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_universal_newlines s
			
	cCs©tjtjddtdgdtjdtjddƒ}|j|jjƒ|j|j	jƒ|j
ƒ\}}ttdƒr•|j
|d	ƒn|j
|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");R6RR¦iR§s#line1
line2
line3
line4
line5
line6s%line1
line2
line3
line4
line5
line6(RRER"R#R¨RNROR6RPRRUR©RªR(RRRR6R((s0/usr/local/lib/python2.7/test/test_subprocess.pyt#test_universal_newlines_communicate;s
		
	c	Csptsd}nd}g}zx~t|ƒD]_}y*|jtjtjtjtjBƒƒWq+t	k
r‰}|j
t
jkr…‚nPq+Xq+W|jd|ƒx'tdƒD]}tj
|jƒƒq¬WxmtdƒD]_}tjtjddgdtjd	tjd
tjƒ}|jdƒd}|j|dƒqÖWWdx|D]}tj
|ƒqDWtjtjƒXdS(
Niis4failed to reach the file descriptor limit (tried %d)i
is-cs-import sys;sys.stdout.write(sys.stdin.read())RQR6Rtlimei(RœtrangetappendR=topenRtTESTFNtO_WRONLYtO_CREATtOSErrorterrnotEMFILEtskipTestRPtpopRRER"R#RNRURtunlink(Rtmax_handlesthandlestiteRRtdatath((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_no_leakingXs8						
cCs|jtjdddgƒdƒ|jtjdddgƒdƒ|jtjdddgƒd	ƒ|jtjd
ddgƒd
ƒ|jtjdddgƒdƒ|jtjdddgƒdƒ|jtjdddgƒdƒ|jtjddgƒdƒdS(Nsa b cRkR½s"a b c" d esab"cs\s	ab\"c \ ds \s
ab\"c " \\" dsa\\\bsde fgR¿sa\\\b "de fg" hsa\"bR,s
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.7/test/test_subprocess.pyttest_list2cmdline~s cCs{tjtjddgƒ}d}x-|jƒdkrPtjdƒ|d7}q$W|j|dƒ|j	|jƒdƒdS(Ns-csimport time; time.sleep(1)igš™™™™™¹?ii(
RRER"R#tpollRttimetsleeptassertGreaterEqualR(RRRtcount((s0/usr/local/lib/python2.7/test/test_subprocess.pyt	test_poll‘s
cCsKtjtjddgƒ}|j|jƒdƒ|j|jƒdƒdS(Ns-csimport time; time.sleep(2)i(RRER"R#RR	(RRR((s0/usr/local/lib/python2.7/test/test_subprocess.pyt	test_wait¡scCs6|jtƒ!tjtjddgdƒWdQXdS(Ns-cR…Ro(R(RDRRER"R#(R((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_invalid_bufsize©scCs…x~tdƒD]p}|jtƒ)}tjdgdtjdtjƒWdQX|jjtjtj	tj
fkr
|j‚q
q
WdS(Nitnonexisting_i_hopeR6R(R®R(tEnvironmentErrorRRERNR*RµtENOENTtENOTDIRtEACCES(RR¼R,((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_leaking_fds_on_error¯s	$sthreading requiredcság‰‡fd†}tjd|ƒ}|jƒzE|jtƒ0tjdgdtjdtjdtjƒWdQXWd|jƒd}x;ˆD]3}yt
j|ƒWqtk
rÂ}|}qXqW|dk	rÜ|‚nXdS(Ncs;x4tdƒD]&}ˆjtjƒƒtjdƒq
WdS(Nigü©ñÒMbP?(R®textendR=R›RÅRÆ(R¼(tfds(s0/usr/local/lib/python2.7/test/test_subprocess.pytopen_fdsÃsttargetRÌRQR6R(
t	threadingtThreadtstartR(RÍRRERNtjoinRR=RPR´(RRÔtttexctfdR½((RÓs0/usr/local/lib/python2.7/test/test_subprocess.pyttest_double_close_on_error¿s&
		

cCs
tjƒ\}}tjƒ\}}tjƒ\}}y&tjdgd|d|d|ƒWn_tk
r½tj|ƒtj|ƒtj|ƒtj|ƒtj|ƒtj|ƒnX|jtj	j
|ƒƒ|jtj	j
|ƒƒ|jtj	j
|ƒƒdS(Nt*RQR6R(RftmkstempRRER´R=RPtremoveRR]texists(Rtifhandletifnametofhandletofnametefhandletefname((s0/usr/local/lib/python2.7/test/test_subprocess.pyt test_handles_closed_on_exceptionÝs 





cCs„tjtjddgdtjdtjdtjƒ}|j|jjƒ|j|jjƒ|j|j	jƒ|j
dd	ƒdS(
Ns-cR…RQR6RRžiii(RRER"R#RNROR6RPRRQRU(RRR((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_communicate_epipeñs		cCsYtjtjddgdtjƒ}|j|jjƒtj	dƒ|j
ddƒdS(Ns-cR…RQiRžii(RRER"R#RNRORQRPRÅRÆRU(RRR((s0/usr/local/lib/python2.7/test/test_subprocess.pyt!test_communicate_epipe_only_stdinüs

cCs‰dtjƒ}tj|ƒ}|jtƒ6ttjddgdtj	dtj	dtj	ƒWdQXtj|ƒ}|j
||ƒdS(s;Test for the fork() failure fd leak reported in issue16327.s/proc/%d/fds-cR…RQR6RN(R=RR’R(RRR"R#RRNR(RR“tfds_before_popentfds_after_exception((s0/usr/local/lib/python2.7/test/test_subprocess.pyt!test_failed_child_execute_fd_leaksN(ARRR%R'R-R2R3R5R9RARMRSRTRZRatunittesttskipIft	sysconfigtis_python_buildRbReRlRnRqRrRsRuRvRwRyR{R|R}RƒR„R‡RŠR‹RRŽRt
skipUnlessR=R]tisdirRR—R˜R¢R¥R«R¬RÀRÃRÉRÊRËRÑRÖRRÝRèRéRêRí(((s0/usr/local/lib/python2.7/test/test_subprocess.pyR Ssn									
	
						
	
					
			
							
											&					!			
t_SuppressCoreFilescBsJeZdZdZd„Zd„Zeje	e
dƒdƒd„ƒZRS(s-Try to prevent core files from being created.cCsÃtd
k	rXy,tjtjƒ|_tjtjdƒWqXttjfk
rTqXXntj	dkr¿t
jddddgdt
jƒj
ƒd}|jƒdkr¿d	GHtjjƒq¿nd
S(s3Try to save previous ulimit, then set it to (0, 0).itdarwins/usr/bin/defaultsRpscom.apple.CrashReportert
DialogTypeR6t	developers;this tests triggers the Crash Reporter, that is intentionalN(ii(tresourceRt	getrlimittRLIMIT_COREt	old_limitt	setrlimitR7terrorR"tplatformRRERNRUtstripR6tflush(Rtvalue((s0/usr/local/lib/python2.7/test/test_subprocess.pyt	__enter__scGs]|jdkrdStdk	rYytjtj|jƒWqYttjfk
rUqYXndS(s%Return core file behavior to default.N(RûRRøRüRúR7Rý(RR((s0/usr/local/lib/python2.7/test/test_subprocess.pyt__exit__5stSIGALRMsRequires signal.SIGALRMc
Csµd„}tjtj|ƒ}|jtjtj|ƒtjddg}xedD]]}itj|6}tj||3}tjdƒz|j	ƒWdtjdƒXWdQXqPWdS(	NcSsdS(N((tsignumtframe((s0/usr/local/lib/python2.7/test/test_subprocess.pythandlerCss-csimport time; time.sleep(2)R6Rii(R6R(
tsignalRROR"R#RRNREtalarmRU(RRtold_handlerRtstreamtkwtprocess((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_communicate_eintr?s	

N(RRRRRûRRRîRòR©RR(((s0/usr/local/lib/python2.7/test/test_subprocess.pyRôs		
sPOSIX specific teststPOSIXProcessTestCasecBs®eZd„Zd„Zd„Zdejfd„ƒYZej	e
jjdƒdƒd„ƒZ
d„Zd	„Zd
„Zd„Zd„Zd
„Zd„Zej	ejjd*ƒdƒd„ƒZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z!d„Z"d„Z#d„Z$d„Z%d „Z&d!„Z'd"„Z(d#„Z)d$„Z*d%„Z+d&„Z,ej-e.d+k	oše0e.d'ƒd(ƒd)„ƒZ1RS(,cCsS|jtƒ(}tjtjddgddƒ}WdQX|jd|jjƒdS(Ns-cRR\s/this/path/does/not/existsos.chdir(	R(R´RRER"R#R0R*tchild_traceback(RR,RR((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_exceptionsXscCsPtƒ*tjtjddgƒ}|jƒWdQX|j|jtj	ƒdS(Ns-csimport os; os.abort()(
RôRRER"R#R	RR+RtSIGABRT(RRR((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_run_abort`s

cCs]tjtjddgdtjdd„ƒ}|j|jjƒ|j|jj	ƒdƒdS(Ns-cs3import sys, os;sys.stdout.write(os.getenv('FRUIT'))R6t
preexec_fncSstjddƒS(NR;tapple(R=tputenv(((s0/usr/local/lib/python2.7/test/test_subprocess.pyt<lambda>nRR(
RRER"R#RNROR6RPRRp(RRR((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_preexechs		t_TestExecuteChildPopencBs eZdZd„Zd„ZRS(s3Used to test behavior at the end of _execute_child.cOs#||_tjj|||ŽdS(N(t	_testcaseRRERF(RttestcaseRR((s0/usr/local/lib/python2.7/test/test_subprocess.pyRFts	cCsÐzGtjj||||||||||	|
|||
||||ƒWdgtdƒD]}tjdtjƒ^qW}z1x*|D]"}|jj||
||fƒq‚WWdx|D]}tj	|ƒq³WXXdS(Nis	/dev/zero(
RRERR®R=R°tO_RDONLYRtassertNotInRP(RRR#Rt	close_fdsR\R<R¦tstartupinfot
creationflagstshelltto_closetp2creadtp2cwritetc2preadtc2pwriteterrreadterrwritet_tdevzero_fdsRÜ((s0/usr/local/lib/python2.7/test/test_subprocess.pyRxs 		+
	
(RRRRFR(((s0/usr/local/lib/python2.7/test/test_subprocess.pyRrs	s	/dev/zeros/dev/zero required.cCs`d„}|jtƒB|j|tjddgdtjdtjdtjd|ƒWdQXdS(	s6Issue16140: Don't double close pipes on preexec error.cSstdƒ‚dS(Ns-force the _execute_child() errpipe_data path.(tRuntimeError(((s0/usr/local/lib/python2.7/test/test_subprocess.pytraise_it˜ss-cR…RQR6RRN(R(R+RR"R#RRN(RR,((s0/usr/local/lib/python2.7/test/test_subprocess.pyt0test_preexec_errpipe_does_not_double_close_pipes”s	cCs“tjƒ\}}tj|dƒtj|dtjƒtj|ƒtj|dƒtj	|ƒ}|j
ƒtj|ƒ|j|j
dƒdS(Ns
#!/bin/sh
s(exec '%s' -c 'import sys; sys.exit(47)'
iÀi/(RfRßR=RdR"R#RPtchmodRRER	RàRR+(RtftfnameRR((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_args_string¡s


cCsT|jttjtjddgddƒ|jttjtjddgddƒdS(Ns-csimport sys; sys.exit(47)Ri/R (R(R7RR!R"R#(R((s0/usr/local/lib/python2.7/test/test_subprocess.pyRM®s				cCsvtjjƒ}d|d<tjdgdddtjd|ƒ}|j|jjƒ|j	|jj
ƒjƒdƒdS(NRR;secho $FRUITR!iR6R<(R=R>R?RRERNROR6RPRRpRÿ(RR@RR((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_shell_sequence¹s
		cCsstjjƒ}d|d<tjddddtjd|ƒ}|j|jjƒ|j	|jj
ƒjƒdƒdS(NRR;secho $FRUITR!iR6R<(R=R>R?RRERNROR6RPRRpRÿ(RR@RR((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_shell_stringÃs
		cCs†tjƒ\}}tj|dƒtj|dtjƒtj|ƒtj|dƒtj	|ƒ}tj
|ƒ|j|dƒdS(Ns
#!/bin/sh
s(exec '%s' -c 'import sys; sys.exit(47)'
iÀi/(RfRßR=RdR"R#RPR.RR!RàR(RR/R0R$((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_call_stringÍs

c	Cs*g}xedddgD]T}xKddgD]=}tjj||ƒ}tjj|ƒr)|j|ƒq)q)WqW|s„|jdƒnd}tjj|ƒr¿tjj|ƒr¿|j|ƒnxd|D]\}tjdd	|d
t	dtj
ƒ}|j|jj
ƒ|j|jjƒjƒ|ƒqÆWdS(Ns/bins	/usr/bin/s/usr/local/bintbashtkshs"bash or ksh required for this tests/bin/shsecho $0R#R!R6(R=R]RÙtisfileR¯R·tislinkRREtTrueRNROR6RPRRpRÿ(RtshellstprefixtnametshRR((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_specific_shellÙs %
c
Gsctjtjddgdtdtjdtjdtjƒ}|jjdƒt||ƒ|Œ|S(Ns-csâif 1:
                             import sys, time
                             sys.stdout.write('x\n')
                             sys.stdout.flush()
                             time.sleep(30)
                             RRQR6Ri(	RRER"R#R9RNR6Rptgetattr(RtmethodRRR((s0/usr/local/lib/python2.7/test/test_subprocess.pyt
_kill_processís			tnetbsdtopenbsds"Due to known OS bug (issue #16762)c
Gsztjtjddgdtdtjdtjdtjƒ}|jjdƒtj	dƒt
||ƒ|Œ|jƒdS(Ns-cs¶if 1:
                             import sys, time
                             sys.stdout.write('x\n')
                             sys.stdout.flush()
                             RRQR6Ri(RRER"R#R9RNR6RpRÅRÆR?RU(RR@RRR((s0/usr/local/lib/python2.7/test/test_subprocess.pyt_kill_dead_processs			
cCsQ|jdtjƒ}|jƒ\}}|jd|ƒ|j|jƒdƒdS(Ntsend_signaltKeyboardInterrupti(RARtSIGINTRUR0tassertNotEqualR	(RRRR)R((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_send_signalscCsO|jdƒ}|jƒ\}}|j|dƒ|j|jƒtjƒdS(NtkillR(RARURRR	RtSIGKILL(RRRR)R((s0/usr/local/lib/python2.7/test/test_subprocess.pyt	test_killscCsO|jdƒ}|jƒ\}}|j|dƒ|j|jƒtjƒdS(Nt	terminateR(RARURRR	RtSIGTERM(RRRR)R((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_terminate#scCs|jdtjƒdS(NRE(RDRRG(R((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_send_signal_dead)scCs|jdƒdS(NRJ(RD(R((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_kill_dead-scCs|jdƒdS(NRM(RD(R((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_terminate_dead1sc	Cs*d}g}x?|D]7}tj|ƒ}|j|ƒ|dkr|}qqWz†x|D]}tj|ƒqXWtjtjddgd|dtjdtjƒj	ƒ\}}t
j|ƒ}|j||fd	ƒWdx-t
||ƒD]\}}tj||ƒqçWx|D]}tj|ƒqWXdS(
Nis-csRimport sys;sys.stdout.write("apple");sys.stdout.flush();sys.stderr.write("orange")RQR6RRRo(RRo(R=tdupR¯RPRRER"R#RNRURtstrip_python_stderrRtziptdup2(	RRÓRQtnewfdstatbRÜRXRY((s0/usr/local/lib/python2.7/test/test_subprocess.pytcheck_close_std_fds5s*



		
cCs|jdgƒdS(Ni(RZ(R((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_close_fd_0RscCs|jdgƒdS(Ni(RZ(R((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_close_fd_1UscCs|jdgƒdS(Ni(RZ(R((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_close_fd_2XscCs|jddgƒdS(Nii(RZ(R((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_close_fds_0_1[scCs|jddgƒdS(Nii(RZ(R((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_close_fds_0_2^scCs|jddgƒdS(Nii(RZ(R((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_close_fds_1_2ascCs|jdddgƒdS(Niii(RZ(R((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_close_fds_0_1_2dscCsôgtdƒD]}tjƒ^q
}g|D]\}}|^q,}zŠx!|D]\}}tj|ƒqNWgtdƒD]}tj|ƒ^qx}	zÜx*t|ƒD]\}}
tj|
|ƒq£Wtj|dƒtj	|ddƒt
jtj
ddgd|d|d|ƒ}|jƒx!|D]}tj	|ddƒq$Wtj|d	ƒ}tjtj|d	ƒƒ}
Wdx7t|	ƒD])\}}tj||ƒtj|ƒqWX|j|d
ƒ|j|
dƒWdx|D]}tj|ƒqØWXdS(NitSTDINis-csZimport sys; got = sys.stdin.read();sys.stdout.write("got %s"%got); sys.stderr.write("err")RQR6Ris	got STDINRY(R®RfRßR=R¹RSt	enumerateRVRdRiRRER"R#R	RpRRTRPR(Rtstdin_not	stdout_not	stderr_noR¼ttempsRÜR0ttemp_fdst	saved_fdsttemp_fdRRRXRYtstdtsaved((s0/usr/local/lib/python2.7/test/test_subprocess.pytcheck_swap_fdsis8%(		


cCsv|jdddƒ|jdddƒ|jdddƒ|jdddƒ|jdddƒ|jdddƒdS(Niii(Rm(R((s0/usr/local/lib/python2.7/test/test_subprocess.pyt
test_swap_fds›scCsotjdddƒ}tjtj|gdtjdtjƒ}|jƒ\}}|jd|j	d|ƒdS(Nssigchild_ignore.pytsubdirtsubprocessdataR6Ris6sigchild_ignore.py exited non-zero with this error:
%s(
RtfindfileRRER"R#RNRURR+(Rtsigchild_ignoreRRR6R((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_wait_when_sigchild_ignored£s	cCs›tjtjddgdtjdtjƒ}|j|jjƒ|j|jjƒt	|ƒ}|j
}~|j|gtjD]}t	|ƒ^q~ƒdS(Ns-cs import sys, time;time.sleep(0.2)R6R(
RRER"R#RNROR6RPRtidtpidR0R(RRRtidentRuto((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_zombie_fast_process_del­s			c
CsEtjtjddgdtjdtjƒ}|j|jjƒ|j|jjƒt	|ƒ}|j
}~tj|t
jƒ|j|gtjD]}t	|ƒ^q‘ƒtjdƒ|jtƒ4}tjdgdtjdtjƒ}WdQXWdQX|jttj|dƒ|j|gtjD]}t	|ƒ^q(ƒdS(Ns-csimport time;time.sleep(3)R6Rgš™™™™™É?RÌi(RRER"R#RNROR6RPRRtRuR=RJRRKR0RRÅRÆR(RÍR´twaitpidR(RRRRvRuRwR,tproc((s0/usr/local/lib/python2.7/test/test_subprocess.pyt!test_leak_fast_process_del_killed¿s&			,
	c
Csätjtjddgdtjdtjdtjƒ}tjtjddg|j|j|jfD]}|jƒ^qagdtjdtjdtjdt	ƒ}|j
dƒ|j
ƒ\}}|j|jd	d
t
|ƒƒdS(Ns-csimport os;os.read(0, 1)RQR6Rsif True:
                               import os, errno, sys
                               for fd in %r:
                                   try:
                                       os.close(fd)
                                   except OSError as e:
                                       if e.errno != errno.EBADF:
                                           raise
                                   else:
                                       sys.exit(1)
                               sys.exit(0)
                               RtfooisUnexpected error: (RRER"R#RNRQR6RRhtFalseRURR+trepr(Rtp1R/tp2R)R((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_pipe_cloexecßs	&
t
W_STOPCODEsneed _testcapi.W_STOPCODEcs¬tjddg}tj|ƒ}|j}tj|dƒ\}‰|jˆdƒtj	dƒ‰‡fd†}t
jtd|ƒ|jƒ}WdQX|j|dƒdS(	sATest wait() behavior when waitpid returns WIFSTOPPED; issue29335.s-cR…iics
|ˆfS(N((Rutflags(tstatus(s0/usr/local/lib/python2.7/test/test_subprocess.pytmock_waitpid
sRyNiýÿÿÿ(
R"R#RRERuR=RyRt	_testcapiR‚Rt	swap_attrR	(RRRzRuR…R+((R„s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_stoppedþs	(RBRCN(2RRRRRRRERRîRïR=R]RáR-R1RMR2R3R4R>RAR"Rþt
startswithRDRIRLRORPRQRRRZR[R\R]R^R_R`RaRmRnRsRxR{RRòR†RR©Rˆ(((s0/usr/local/lib/python2.7/test/test_subprocess.pyRUsJ			
"(
	
		
	
																		2		
		 	sWindows specific teststWin32ProcessTestCasecBseZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z	d„Z
d	„Zd
„Zd„Z
d„Zd
„Zd„ZRS(cCsMd}d}tjƒ}||_||_tjtjddgd|ƒdS(Niis-csimport sys; sys.exit(0)R(RtSTARTUPINFOtdwFlagstwShowWindowR!R"R#(RtSTARTF_USESHOWWINDOWtSW_MAXIMIZER((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_startupinfos		cCs4d}tjjdƒtjtjdd|ƒdS(Nis'    a DOS box should flash briefly ...
s# -c "import time; time.sleep(0.25)"R (R"RRdRR!R#(RtCREATE_NEW_CONSOLE((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_creationflags(s
cCs`|jttjtjddgdd„ƒ|jttjtjddgdtjdtƒdS(Ns-csimport sys; sys.exit(47)RcSsdS(Ni((((s0/usr/local/lib/python2.7/test/test_subprocess.pyR5RR6R(R(R7RR!R"R#RNR9(R((s0/usr/local/lib/python2.7/test/test_subprocess.pyRM0s		
			cCs5tjtjddgdtƒ}|j|dƒdS(Ns-csimport sys; sys.exit(47)Ri/(RR!R"R#R9R(RR$((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_close_fds<s		cCsptjjƒ}d|d<tjdgdddtjd|ƒ}|j|jjƒ|j	d|jj
ƒƒdS(NtphysalisR;tsetR!iR6R<(R=R>R?RRERNROR6RPR0Rp(RR@RR((s0/usr/local/lib/python2.7/test/test_subprocess.pyR2Cs
		cCsmtjjƒ}d|d<tjddddtjd|ƒ}|j|jjƒ|j	d|jj
ƒƒdS(NR”R;R•R!iR6R<(R=R>R?RRERNROR6RPR0Rp(RR@RR((s0/usr/local/lib/python2.7/test/test_subprocess.pyR3Ms
		cCs*tjtjdƒ}|j|dƒdS(Ns -c "import sys; sys.exit(47)"i/(RR!R"R#R(RR$((s0/usr/local/lib/python2.7/test/test_subprocess.pyR4Ws
cGsÔtjtjddgdtjdtjdtjƒ}|j|jjƒ|j|jjƒ|j|j	jƒ|jj
dƒt||ƒ|Œ|jƒ\}}|j
|dƒ|jƒ}|j|dƒdS(	Ns-csâif 1:
                             import sys, time
                             sys.stdout.write('x\n')
                             sys.stdout.flush()
                             time.sleep(30)
                             RQR6RiRi(RRER"R#RNROR6RPRRQRpR?RURR	RH(RR@RRRR)RR+((s0/usr/local/lib/python2.7/test/test_subprocess.pyRA]s			cGsátjtjddgdtjdtjdtjƒ}|j|jjƒ|j|jjƒ|j|j	jƒ|jj
dƒtjdƒt
||ƒ|Œ|jƒ\}}|j|dƒ|jƒ}|j|dƒdS(	Ns-csàif 1:
                             import sys, time
                             sys.stdout.write('x\n')
                             sys.stdout.flush()
                             sys.exit(42)
                             RQR6RiRi*(RRER"R#RNROR6RPRRQRpRÅRÆR?RURR	R(RR@RRRR)RR$((s0/usr/local/lib/python2.7/test/test_subprocess.pyRDts			
cCs|jdtjƒdS(NRE(RARRN(R((s0/usr/local/lib/python2.7/test/test_subprocess.pyRIscCs|jdƒdS(NRJ(RA(R((s0/usr/local/lib/python2.7/test/test_subprocess.pyRLscCs|jdƒdS(NRM(RA(R((s0/usr/local/lib/python2.7/test/test_subprocess.pyRO“scCs|jdtjƒdS(NRE(RDRRN(R((s0/usr/local/lib/python2.7/test/test_subprocess.pyRP–scCs|jdƒdS(NRJ(RD(R((s0/usr/local/lib/python2.7/test/test_subprocess.pyRQ™scCs|jdƒdS(NRM(RD(R((s0/usr/local/lib/python2.7/test/test_subprocess.pyRRœs(RRRR’RMR“R2R3R4RARDRIRLRORPRQRR(((s0/usr/local/lib/python2.7/test/test_subprocess.pyRŠs					
	
								t	_has_pollspoll system call not supportedtProcessTestCaseNoPollcBseZd„Zd„ZRS(cCstt_tj|ƒdS(N(R}RR–R R(R((s0/usr/local/lib/python2.7/test/test_subprocess.pyR£s	cCstt_tj|ƒdS(N(R9RR–R R(R((s0/usr/local/lib/python2.7/test/test_subprocess.pyR§s	(RRRR(((s0/usr/local/lib/python2.7/test/test_subprocess.pyR— s	tHelperFunctionTestscBs#eZejedƒd„ƒZRS(s(errno and EINTR make no sense on windowscs€g‰‡fd†}|jdtj|ddƒƒ|jdgˆƒ|jdtj|dƒƒ|jdd	d
gˆƒdS(NcsDˆj|ƒtˆƒdkr4ttjdƒ‚ntt|ƒƒS(Nisfake interrupted system call(R¯R‘R´RµtEINTRttupletreversed(R(trecord_calls(s0/usr/local/lib/python2.7/test/test_subprocess.pytfake_os_func°s
içiiš(içi(iiç(iš(iiç(iš(iš(RRt_eintr_retry_call(RR((Rœs0/usr/local/lib/python2.7/test/test_subprocess.pyttest_eintr_retry_call­s		(RRRîRïRœRŸ(((s0/usr/local/lib/python2.7/test/test_subprocess.pyR˜¬ssmswindows onlytCommandsWithSpacescBsGeZd„Zd„Zd„Zd„Zd„Zd„Zd„ZRS(cCs[tt|ƒjƒtjddƒ\}}|jƒ|_tj|dƒtj	|ƒdS(Ns.pyste stsVimport sys;sys.stdout.write('%d %s' % (len(sys.argv), [a.lower () for a in sys.argv]))(
tsuperR RRfRßtlowerR0R=RdRP(RR/R0((s0/usr/local/lib/python2.7/test/test_subprocess.pyRÁs
cCs'tj|jƒtt|ƒjƒdS(N(R=RàR0R¡R R(R((s0/usr/local/lib/python2.7/test/test_subprocess.pyRÊscOs_tj|d<tj||Ž}|j|jjƒ|j|jjƒjdƒd|j	ƒdS(NR6tmbcss2 [%r, 'ab cd'](
RRNREROR6RPRRptdecodeR0(RRRRR((s0/usr/local/lib/python2.7/test/test_subprocess.pytwith_spacesÎs
cCs*|jdtj|jdfddƒdS(Ns"%s" "%s" "%s"sab cdR!i(R¥R"R#R0(R((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_shell_string_with_spaces×scCs&|jtj|jdgddƒdS(Nsab cdR!i(R¥R"R#R0(R((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_shell_sequence_with_spacesÜscCs$|jdtj|jdfƒdS(Ns"%s" "%s" "%s"sab cd(R¥R"R#R0(R((s0/usr/local/lib/python2.7/test/test_subprocess.pyttest_noshell_string_with_spacesàscCs |jtj|jdgƒdS(Nsab cd(R¥R"R#R0(R((s0/usr/local/lib/python2.7/test/test_subprocess.pyt!test_noshell_sequence_with_spacesås(	RRRRR¥R¦R§R¨R©(((s0/usr/local/lib/python2.7/test/test_subprocess.pyR ¾s								cCs3ttttttf}tj|ŒtjƒdS(N(	R RRŠR—R˜R Rtrun_unittestR(t
unit_tests((s0/usr/local/lib/python2.7/test/test_subprocess.pyt	test_mainés	
t__main__(+RîttestRRR"RþRR=RµRfRÅRRðttextwraptctypestImportErrorRtctypes.utilRøRÖR†RœR¨tTestCaseRt	ExceptionRRERR tobjectRôRïRRòRŠR?R}R—R˜R R¬R(((s0/usr/local/lib/python2.7/test/test_subprocess.pyt<module>sl







	ÿÿÉ;ÿÁ‰	
*	

Zerion Mini Shell 1.0