ó ú…abc@sÏdZddlZddlZddlZddlZddlZddlZddlZddlZddl m Z ddl m Z y6ddl mZmZmZdefd„ƒYZWn!ek rßddlmZnXeaeae jZd „Zd ejfd „ƒYZd efd „ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZ defd„ƒYZ!defd„ƒYZ"defd„ƒYZ#defd„ƒYZ$defd„ƒYZ%d efd!„ƒYZ&d"efd#„ƒYZ'd$efd%„ƒYZ(d&efd'„ƒYZ)d(efd)„ƒYZ*d*efd+„ƒYZ+d,efd-„ƒYZ,d.efd/„ƒYZ-d0„Z.d1„Z/e0d2krËe/ƒndS(3sv Tests for the 'cheetah' command. Besides unittest usage, recognizes the following command-line options: --list CheetahWrapper.py List all scenarios that are tested. The argument is the path of this script. --nodelete Don't delete scratch directory at end. --output Show the output of each subcommand. (Normally suppressed.) iÿÿÿÿN(t OptionParser(tCheetahWrapper(tPopentPIPEtSTDOUTtPopen4cBs#eZdeeeeed„ZRS(iÿÿÿÿc Ksett|ƒj|d|d|d|d|d|d|||j|_|j|_|j|_dS(Ntbufsizetshellt close_fdststdintstdouttstderr( tsuperRt__init__R ttochildR t fromchildR tchilderr( tselftcmdRRRR R R tkwargs((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyR s !   (t__name__t __module__tTrueRRR (((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyRs (RcCstjj|dƒdS(Ns (tsysR twrite(tmsg((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pytwarn.stCFBasecBs¤eZdZdZdZdZeZd„Zd„Z d „Z d „Z d „Z d „Z d „Zd„Zd„Zd„Zd„Zed„Zddd„ZRS(sDBase class for "cheetah compile" and "cheetah fill" unit tests. ttchildschild/grandkidsa.tmpls child/a.tmplschild/grandkid/a.tmplcCs|jr|GHndS(N(tverbose(Rtmessage((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pytinform9s cCs|jdƒ|_tjƒ}tjjdƒs@|tjdt failUnlessR2treadR3tfindtlocals( RR=texpectedtallowSurroundingTextterrmsgR>RR8tresulttsuccess((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyt_checkDestFileHelperbs      cCs&d}d}|j||t|ƒdS(Ns Hello, world!sJdestination file %(path)s doesn't contain expected substring: %(expected)r(RKR(RR=RFRH((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyt checkCompile}scCs&d}d}|j||t|ƒdS(NsHello, world! sWdestination file %(path)s contains wrong result. Expected %(expected)r Found %(result)r(RKtFalse(RR=RFRH((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyt checkFill‡scCsqtjj|ƒ}d|}|j||ƒtjj|dƒ}tjj|ƒ}d|}|j||ƒdS(s^Verify a destination subdirectory exists and contains an __init__.py file. s$destination subdirectory %s misssings __init__.pys!destination init file missing: %sN(R%R=R>RBtjoin(RR=R>RtinitPath((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pytcheckSubdirPyInits  cCs0tjj|ƒ}d|}|j||ƒdS(s>Verify 'path' does not exist. (To check --nobackup.) s-backup file exists in spite of --nobackup: %sN(R%R=R>tfailIf(RR=R>R((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyt checkNoBackups cCs‰tjdƒ}|s|S|jdƒ}|jdƒ}xK|D]C}tjj||ƒ}tjj|ƒ}tjj|ƒr>|Sq>W|S(NtPATHt t:(R%tgetenvtsplitR=RORAtisfile(RRtpathstpartstp((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyR$¤s cCsVtj|ƒ\}}|jƒ|jƒ}|jƒ}|dkrLd}n||fS(Ni(R%tpopen4R3RCtNone(RRt_int_outtoutputtrc((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pytassertWin32Subprocess±s     cCsi|jd|jƒ}t|dtjƒ}|jjƒ|jjƒ}|j ƒ}|jjƒ||fS(NR!tenv( treplaceRRR%R'RR3RRCtwait(RRtprocessRatstatus((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pytassertPosixSubprocessºs   cCsd\}}tjdkr3|j|ƒ\}}n|j|ƒ\}}|sn|j|dd||fƒn|j|dd||fƒ|S(Ntwin32isLSubprocess exited with a non-zero status (%d) %ssHSubprocess exited with a zero status (%d) %s(NN(R^RtplatformRcRitfailUnlessEqualt failIfEqual(RRtnonzeroRhRa((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pytassertSubprocessÃs   icCsW|j|ƒ}|dk rSd||f}|j|ƒdk}|j||ƒndS(sÓRun a "cheetah compile" or "cheetah fill" subcommand. in : cmd, string, the command to run. expectedStatus, int, subcommand's expected output status. 0 if the subcommand is expected to succeed, 1-255 otherwise. expectedOutputSubstring, string, substring which much appear in the standard output or standard error. None to skip this test. out: None. s/substring %r not found in subcommand output: %siÿÿÿÿN(RoR^RDRB(RRtexpectedStatustexpectedOutputSubstringRaRt substringTest((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pytgoÒs   (Rschild/grandkid(sa.tmpls child/a.tmplschild/grandkid/a.tmplN(RRt__doc__R/R0R1RMt expectErrorR R9R?RKRLRNRQRSR$RcRiRoR^Rs(((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyR1s$     t CFIdirBasecBs eZdZdZdZdZRS( s$Subclass for tests with --idir. tSRCs SRC/childsSRC/child/grandkids SRC/a.tmplsSRC/child/a.tmplsSRC/child/grandkid/a.tmpl(s SRC/childsSRC/child/grandkid(s SRC/a.tmplsSRC/child/a.tmplsSRC/child/grandkid/a.tmpl(RRRtR/R0R1(((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyRvåstOneFilecBs#eZd„Zd„Zd„ZRS(cCs|jdƒ|jdƒdS(Nscheetah compile a.tmplsa.py(RsRL(R((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyt testCompileòs cCs|jdƒ|jdƒdS(Nscheetah fill a.tmplsa.html(RsRN(R((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyttestFillös cCs|jdƒ|jdƒdS(Nscheetah fill --oext txt a.tmplsa.txt(RsRN(R((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyttestTextús (RRRyRzR{(((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyRxñs  tOneFileNoExtensioncBs#eZd„Zd„Zd„ZRS(cCs|jdƒ|jdƒdS(Nscheetah compile asa.py(RsRL(R((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyRys cCs|jdƒ|jdƒdS(Nscheetah fill asa.html(RsRN(R((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyRzs cCs|jdƒ|jdƒdS(Nscheetah fill --oext txt asa.txt(RsRN(R((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyR{s (RRRyRzR{(((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyR|ÿs  t SplatTmplcBs#eZd„Zd„Zd„ZRS(cCs|jdƒ|jdƒdS(Nscheetah compile *.tmplsa.py(RsRL(R((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyRys cCs|jdƒ|jdƒdS(Nscheetah fill *.tmplsa.html(RsRN(R((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyRzs cCs|jdƒ|jdƒdS(Nscheetah fill --oext txt *.tmplsa.txt(RsRN(R((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyR{s (RRRyRzR{(((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyR} s  tThreeFilesWithSubdirectoriescBs#eZd„Zd„Zd„ZRS(cCs8|jdƒ|jdƒ|jdƒ|jdƒdS(Ns9cheetah compile a.tmpl child/a.tmpl child/grandkid/a.tmplsa.pys child/a.pyschild/grandkid/a.py(RsRL(R((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyRys   cCs8|jdƒ|jdƒ|jdƒ|jdƒdS(Ns6cheetah fill a.tmpl child/a.tmpl child/grandkid/a.tmplsa.htmls child/a.htmlschild/grandkid/a.html(RsRN(R((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyRz!s   cCs8|jdƒ|jdƒ|jdƒ|jdƒdS(NsAcheetah fill --oext txt a.tmpl child/a.tmpl child/grandkid/a.tmplsa.txts child/a.txtschild/grandkid/a.txt(RsRN(R((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyR{'s   (RRRyRzR{(((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyR~s  t'ThreeFilesWithSubdirectoriesNoExtensioncBs#eZd„Zd„Zd„ZRS(cCs8|jdƒ|jdƒ|jdƒ|jdƒdS(Ns*cheetah compile a child/a child/grandkid/asa.pys child/a.pyschild/grandkid/a.py(RsRL(R((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyRy/s   cCs8|jdƒ|jdƒ|jdƒ|jdƒdS(Ns'cheetah fill a child/a child/grandkid/asa.htmls child/a.htmlschild/grandkid/a.html(RsRN(R((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyRz5s   cCs8|jdƒ|jdƒ|jdƒ|jdƒdS(Ns2cheetah fill --oext txt a child/a child/grandkid/asa.txts child/a.txtschild/grandkid/a.txt(RsRN(R((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyR{;s   (RRRyRzR{(((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyR.s  tSplatTmplWithSubdirectoriescBs#eZd„Zd„Zd„ZRS(cCs8|jdƒ|jdƒ|jdƒ|jdƒdS(Ns9cheetah compile *.tmpl child/*.tmpl child/grandkid/*.tmplsa.pys child/a.pyschild/grandkid/a.py(RsRL(R((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyRyCs   cCs8|jdƒ|jdƒ|jdƒ|jdƒdS(Ns6cheetah fill *.tmpl child/*.tmpl child/grandkid/*.tmplsa.htmls child/a.htmlschild/grandkid/a.html(RsRN(R((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyRzIs   cCs8|jdƒ|jdƒ|jdƒ|jdƒdS(NsAcheetah fill --oext txt *.tmpl child/*.tmpl child/grandkid/*.tmplsa.txts child/a.txtschild/grandkid/a.txt(RsRN(R((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyR{Os   (RRRyRzR{(((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyR€Bs  tOneFileWithOdircBs#eZd„Zd„Zd„ZRS(cCs+|jdƒ|jdƒ|jdƒdS(Ns"cheetah compile --odir DEST a.tmpltDESTs DEST/a.py(RsRQRL(R((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyRyWs  cCs|jdƒ|jdƒdS(Nscheetah fill --odir DEST a.tmpls DEST/a.html(RsRN(R((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyRz\s cCs|jdƒ|jdƒdS(Ns*cheetah fill --odir DEST --oext txt a.tmpls DEST/a.txt(RsRN(R((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyR{`s (RRRyRzR{(((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyRVs  tVarietyWithOdircBs#eZd„Zd„Zd„ZRS(cCs_|jdƒ|jdƒ|jdƒ|jdƒ|jdƒ|jdƒ|jdƒdS(Ns@cheetah compile --odir DEST a.tmpl child/a child/grandkid/*.tmplR‚s DEST/childsDEST/child/grandkids DEST/a.pysDEST/child/a.pysDEST/child/grandkid/a.py(RsRQRL(R((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyRyfs      cCs8|jdƒ|jdƒ|jdƒ|jdƒdS(Ns=cheetah fill --odir DEST a.tmpl child/a child/grandkid/*.tmpls DEST/a.htmlsDEST/child/a.htmlsDEST/child/grandkid/a.html(RsRN(R((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyRzos   cCs8|jdƒ|jdƒ|jdƒ|jdƒdS(NsHcheetah fill --odir DEST --oext txt a.tmpl child/a child/grandkid/*.tmpls DEST/a.txtsDEST/child/a.txtsDEST/child/grandkid/a.txt(RsRN(R((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyR{us   (RRRyRzR{(((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyRƒes tRecurseExplicitcBs#eZd„Zd„Zd„ZRS(cCs+|jdƒ|jdƒ|jdƒdS(Nscheetah compile -R childs child/a.pyschild/grandkid/a.py(RsRL(R((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyRy}s  cCs+|jdƒ|jdƒ|jdƒdS(Nscheetah fill -R childs child/a.htmlschild/grandkid/a.html(RsRN(R((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyRz‚s  cCs+|jdƒ|jdƒ|jdƒdS(Ns cheetah fill -R --oext txt childs child/a.txtschild/grandkid/a.txt(RsRN(R((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyR{‡s  (RRRyRzR{(((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyR„|s  tRecurseImplicitcBs#eZd„Zd„Zd„ZRS(cCs+|jdƒ|jdƒ|jdƒdS(Nscheetah compile -Rs child/a.pyschild/grandkid/a.py(RsRL(R((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyRyŽs  cCs8|jdƒ|jdƒ|jdƒ|jdƒdS(Nscheetah fill -Rsa.htmls child/a.htmlschild/grandkid/a.html(RsRN(R((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyRz“s   cCs8|jdƒ|jdƒ|jdƒ|jdƒdS(Nscheetah fill -R --oext txtsa.txts child/a.txtschild/grandkid/a.txt(RsRN(R((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyR{™s   (RRRyRzR{(((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyR…s  tRecurseExplicitWIthOdircBs#eZd„Zd„Zd„ZRS(cCsE|jdƒ|jdƒ|jdƒ|jdƒ|jdƒdS(Ns$cheetah compile -R --odir DEST childs DEST/childsDEST/child/grandkidsDEST/child/a.pysDEST/child/grandkid/a.py(RsRQRL(R((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyRy¡s     cCs+|jdƒ|jdƒ|jdƒdS(Ns!cheetah fill -R --odir DEST childsDEST/child/a.htmlsDEST/child/grandkid/a.html(RsRN(R((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyRz¨s  cCs+|jdƒ|jdƒ|jdƒdS(Ns,cheetah fill -R --odir DEST --oext txt childsDEST/child/a.txtsDEST/child/grandkid/a.txt(RsRN(R((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyR{­s  (RRRyRzR{(((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyR† s  tFlatcBs#eZd„Zd„Zd„ZRS(cCs|jdƒ|jdƒdS(Ns#cheetah compile --flat child/a.tmplsa.py(RsRL(R((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyRy´s cCs|jdƒ|jdƒdS(Ns cheetah fill --flat child/a.tmplsa.html(RsRN(R((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyRz¸s cCs|jdƒ|jdƒdS(Ns+cheetah fill --flat --oext txt child/a.tmplsa.txt(RsRN(R((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyR{¼s (RRRyRzR{(((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyR‡³s  tFlatRecurseCollisioncBs)eZeZd„Zd„Zd„ZRS(cCs|jddtƒdS(Nscheetah compile -R --flatRn(RoR(R((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyRyÄscCs|jddtƒdS(Nscheetah fill -R --flatRn(RoR(R((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyRzÇscCs|jddtƒdS(Nscheetah fill -R --flatRn(RoR(R((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyR{Ês(RRRRuRyRzR{(((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyRˆÁs  t IdirRecursecBs#eZd„Zd„Zd„ZRS(cCsE|jdƒ|jdƒ|jdƒ|jdƒ|jdƒdS(Ns#cheetah compile -R --idir SRC childRschild/grandkids child/a.pyschild/grandkid/a.py(RsRQRL(R((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyRyÏs     cCs+|jdƒ|jdƒ|jdƒdS(Ns cheetah fill -R --idir SRC childs child/a.htmlschild/grandkid/a.html(RsRN(R((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyRzÖs  cCs+|jdƒ|jdƒ|jdƒdS(Ns+cheetah fill -R --idir SRC --oext txt childs child/a.txtschild/grandkid/a.txt(RsRN(R((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyR{Ûs  (RRRyRzR{(((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyR‰Îs  tIdirOdirRecursecBs#eZd„Zd„Zd„ZRS(cCsE|jdƒ|jdƒ|jdƒ|jdƒ|jdƒdS(Ns/cheetah compile -R --idir SRC --odir DEST childs DEST/childsDEST/child/grandkidsDEST/child/a.pysDEST/child/grandkid/a.py(RsRQRL(R((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyRyâs     cCs+|jdƒ|jdƒ|jdƒdS(Ns,cheetah fill -R --idir SRC --odir DEST childsDEST/child/a.htmlsDEST/child/grandkid/a.html(RsRN(R((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyRzés  cCs+|jdƒ|jdƒ|jdƒdS(Ns7cheetah fill -R --idir SRC --odir DEST --oext txt childsDEST/child/a.txtsDEST/child/grandkid/a.txt(RsRN(R((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyR{îs  (RRRyRzR{(((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyRŠás  tIdirFlatRecurseCollisioncBs)eZeZd„Zd„Zd„ZRS(cCs|jddtƒdS(Ns$cheetah compile -R --flat --idir SRCRn(RoR(R((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyRy÷scCs|jddtƒdS(Ns!cheetah fill -R --flat --idir SRCRn(RoR(R((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyRzúscCs|jddtƒdS(Ns,cheetah fill -R --flat --idir SRC --oext txtRn(RoR(R((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyR{ýs(RRRRuRyRzR{(((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyR‹ôs  tNoBackupcBs)eZdZd„Zd„Zd„ZRS(sWRun the command twice each time and verify a backup file is *not* created. cCs/|jdƒ|jdƒ|jdtƒdS(Ns!cheetah compile --nobackup a.tmplsa.py(RsRSt BACKUP_SUFFIX(R((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyRys  cCs/|jdƒ|jdƒ|jdtƒdS(Nscheetah fill --nobackup a.tmplsa.html(RsRSR(R((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyRz s  cCs/|jdƒ|jdƒ|jdtƒdS(Ns)cheetah fill --nobackup --oext txt a.tmplsa.txt(RsRSR(R((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyR{s  (RRRtRyRzR{(((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyRŒs  cCsrtjdƒ}t|ƒ}xFtrc|jƒ}|s:Pn|j|ƒ}|r|jdƒGHqqW|jƒdS(sscheetahWrapperFile, string, path of this script. XXX TODO: don't print test where expectError is true. sself\.go\("(.*?)"\)iN(tretcompileR2RtreadlinetsearchtgroupR3(tcheetahWrapperFiletrxR8tlintm((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyt listTestss   cCs8tƒ}|jdddddƒ|jdddƒ|jdddƒ|jd d ddƒ|jd d ddƒ|jd dddƒ|jƒ\}}|jr®tan|jrÀtan|j rÙt |j ƒn[t j d3x4dD],}t ||ƒrêt j j d|ƒqêqêWt j j|ƒtjƒdS(Ns--listtactiontstoretdestR—s --nodeletet store_trues--outputs-es --explains-vs --verboses-qs--quietitexplainRtquiets--(Rœsverbosesquiet(Rt add_optiont parse_argstnodeleteRMR:RaRtOUTPUTR—Rtargvtgetattrtappendtextendtunittesttmain(tparsertoptstfilestopt((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyR§$s(        t__main__(1RtR%tos.pathtpdbRŽR;RR)R¦toptparseRtCheetah.CheetahWrapperRt subprocessRRRRt ImportErrortpopen2RR:RMR¡RRtTestCaseRRvRxR|R}R~RR€RRƒR„R…R†R‡RˆR‰RŠR‹RŒR—R§R(((sB/usr/lib64/python2.7/site-packages/Cheetah/Tests/CheetahWrapper.pyt sT           ´