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

ó
Nêáac@sÏddlZddlZddlZddlZddlmZmZmZmZej	dkrsej
dƒ‚nedZdejej
fZdejfd„ƒYZd	„Zed
krËeƒndS(iÿÿÿÿN(tTESTFNtrun_unittesttunlinkt
reap_childrentposixs pipes module only works on posixt2str %s %stSimplePipeTestscBs˜eZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z	d„Z
d	„Zd
„Zd„Z
d„Zd
„Zd„Zd„ZRS(cCs%xttfD]}t|ƒq
WdS(N(RtTESTFN2R(tselftf((s+/usr/local/lib/python2.7/test/test_pipes.pyttearDownscCswtjƒ}|jttjƒ|jtdƒ}|jdƒ|jƒttƒ}|j	|j
ƒdƒWdQXdS(Ntwshello world #1sHELLO WORLD #1(tpipestTemplatetappendt	s_commandtSTDIN_STDOUTtopenRtwritetclosetassertEqualtread(RttR	((s+/usr/local/lib/python2.7/test/test_pipes.pyttestSimplePipe1s

cCs‡ttdƒ}|jdƒWdQXtjƒ}|jtdtjƒ|jtt	ƒtt	ƒ}|j
|jƒdƒWdQXdS(NRshello world #2s
 < $IN > $OUTsHELLO WORLD #2(RRRRR
RRtFILEIN_FILEOUTtcopyRRR(RR	R((s+/usr/local/lib/python2.7/test/test_pipes.pyttestSimplePipe2scCs}ttdƒ}|jdƒWdQXtjƒ}|jtdtjƒ|jtdƒ}|j|j	ƒdƒWdQXdS(NRshello world #2s < $INtrsHELLO WORLD #2(
RRRRR
RRt
FILEIN_STDOUTRR(RR	R((s+/usr/local/lib/python2.7/test/test_pipes.pyttestSimplePipe3&sc	Cs›d}ttdƒ}|j|ƒWdQXttdƒ}|jdƒWdQXtjƒ}|jttƒttƒ}|j|jƒ|ƒWdQXdS(Nsempty pipeline test COPYRt(	RRRRRR
RRR(RtdR	R((s+/usr/local/lib/python2.7/test/test_pipes.pyttestEmptyPipeline1.scCsld}ttdƒ}|j|ƒWdQXtjƒ}|jtdƒ}|j|jƒ|ƒWdQXdS(Nsempty pipeline test READRR(RRRRR
RR(RRR	R((s+/usr/local/lib/python2.7/test/test_pipes.pyttestEmptyPipeline2:scCsid}tjƒ}|jtdƒ}|j|ƒWdQXttƒ}|j|jƒ|ƒWdQXdS(Nsempty pipeline test WRITER(RR
RRRRR(RRRR	((s+/usr/local/lib/python2.7/test/test_pipes.pyttestEmptyPipeline3CscCsÍtjtjd}d}|jtjdƒdƒ|jtj|ƒ|ƒ|jtjdƒdƒx/|D]'}|jtjd|ƒd|ƒqlWx/|D]'}|jtjd	|ƒd
|ƒqžWdS(Ns
@%_-+=:,./s"`$\!Rs''stest file names'test file name's
test%snames'test%sname'stest%s'name's'test%s'"'"'name'"'"''(tstringt
ascii_letterstdigitsRRtquote(Rtsafeunquotedtunsafetu((s+/usr/local/lib/python2.7/test/test_pipes.pyttestQuotingLs

cCsOtjƒ}|jt|ƒdƒ|jdtjƒ|jt|ƒdƒdS(Ns<Template instance, steps=[]>s
tr a-z A-Zs1<Template instance, steps=[('tr a-z A-Z', '--')]>(RR
RtreprRR(RR((s+/usr/local/lib/python2.7/test/test_pipes.pyttestReprZs
cCsPtjƒ}|jtƒ|j|jtƒ|jtƒ|j|jtƒdS(N(RR
tdebugtFalseRt	debuggingtTrue(RR((s+/usr/local/lib/python2.7/test/test_pipes.pyttestSetDebugas


cCs<tjƒ}|jdtjƒ|jt|jddƒdS(Ntboguscmdt	bogusfileR(RR
RtSINKtassertRaisest
ValueErrorR(RR((s+/usr/local/lib/python2.7/test/test_pipes.pyttestReadOpenSinkhscCs<tjƒ}|jdtjƒ|jt|jddƒdS(NR2R3R(RR
tprependtSOURCER5R6R(RR((s+/usr/local/lib/python2.7/test/test_pipes.pyttestWriteOpenSourceoscCs<tjƒ}|jt|jdtjƒ|jt|jddƒ|jt|jdtjƒtjƒ}|jdtjƒ|jt|jdtjƒtjƒ}|jt|jdtj	ƒtjƒ}|jt|jdtj
ƒtjƒ}|jt|jdtj	ƒtjƒ}|jt|jdtjƒdS(NiR2txxs
boguscmd $OUTsboguscmd $IN(RR
R5t	TypeErrorRRR6R9R4RRt
STDIN_FILEOUT(RR((s+/usr/local/lib/python2.7/test/test_pipes.pyttestBadAppendOptionsvs&


cCs<tjƒ}|jt|jdtjƒ|jt|jddƒ|jt|jdtjƒtjƒ}|jdtjƒ|jt|jdtjƒtjƒ}|jt|jdtj	ƒtjƒ}|jt|jdtj
ƒtjƒ}|jt|jdtj	ƒtjƒ}|jt|jdtjƒdS(Nis
tr a-z A-ZR;R2s
boguscmd $OUTsboguscmd $IN(RR
R5R<R8RR6R4R9RRR=(RR((s+/usr/local/lib/python2.7/test/test_pipes.pyttestBadPrependOptions˜s&


cCs)tjƒ}|jt|jddƒdS(NR3tx(RR
R5R6R(RR((s+/usr/local/lib/python2.7/test/test_pipes.pyttestBadOpenMode¹scCs™tjƒ}|jdtjƒ|jƒ}|jt|ƒt|ƒƒ|j|j|jƒ|jt|jƒt|jƒƒ|j|j	|j	ƒdS(Ns
tr a-z A-Z(
RR
RRtclonetassertNotEqualtidRtstepsR/(RRR)((s+/usr/local/lib/python2.7/test/test_pipes.pyt	testClone½s"(t__name__t
__module__R
RRRR R!R"R*R,R1R7R:R>R?RARF(((s+/usr/local/lib/python2.7/test/test_pipes.pyRs 																	"	!	cCsttƒtƒdS(N(RRR(((s+/usr/local/lib/python2.7/test/test_pipes.pyt	test_mainÇs
t__main__(RtosR#tunittestttest.test_supportRRRRtnametSkipTestRtascii_lowercasetascii_uppercaseRtTestCaseRRIRG(((s+/usr/local/lib/python2.7/test/test_pipes.pyt<module>s"
¸	

Zerion Mini Shell 1.0