Ñò 9ÝoLc@sÓdZddkZddkZddkZddkZddkZddkZddkZddkZddk l Z ddk l Z y6ddk lZlZlZdefd„ƒYZWn#ej oddklZnXeaeae iZd „Zd eifd „ƒ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/e0d2jo 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|ƒi|d|d|d|d|d|d|||i|_|i|_|i|_dS(Ntbufsizetshellt close_fdststdintstdouttstderr( tsuperRt__init__R ttochildR t fromchildR tchilderr( tselftcmdRRRR R R tkwargs((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyR s !   (t__name__t __module__tTrueRRR (((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyRs (RcCstii|dƒdS(Ns (tsysR twrite(tmsg((sB/usr/lib64/python2.6/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|io |GHndS(N(tverbose(Rtmessage((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pytinform9s cCsÂ|i}tiƒ|_}ti|ƒtiƒ|_ti|ƒ|i oti|i ƒnx|i D]}ti|ƒqmWx7|i D],}t |dƒ}|i dƒ|iƒqŽWdS(sUCreate the top-level directories, subdirectories and .tmpl files. twsHello, world! N(R ttempfiletmktempt scratchDirtostmkdirtgetcwdtorigCwdtchdirtsrcDirtsubdirstsrcFilestopenRtclose(RtIR$tdirtfiltf((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pytsetUp=s       cCsgti|iƒto;ti|itƒtii |iƒot dƒqcnt d|iƒdS(Ns.Warning: unable to delete scratch directory %ss*Warning: not deleting scratch directory %s( R%R)R(tDELETEtshutiltrmtreeR$RtpathtexistsR(R((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyttearDownSs c Cs°tii|ƒ}tii|ƒ}d|}|i||ƒt|dƒ}|iƒ}|iƒ|o|i|ƒdj} n ||j} |t ƒ}|i| |ƒdS(sÒLow-level helper to check a destination file. in : path, string, the destination path. expected, string, the expected contents. allowSurroundingtext, bool, allow the result to contain additional text around the 'expected' substring? errmsg, string, the error message. It may contain the following "%"-operator keys: path, expected, result. out: None sdestination file missing: %striÿÿÿÿN( R%R7tabspathR8t failUnlessR-treadR.tfindtlocals( RR7texpectedtallowSurroundingTextterrmsgR8RR2tresulttsuccess((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyt_checkDestFileHelper]s      cCs&d}d}|i||t|ƒdS(Ns Hello, world!sJdestination file %(path)s doesn't contain expected substring: %(expected)r(RER(RR7R@RB((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyt checkCompilexscCs&d}d}|i||t|ƒdS(NsHello, world! sWdestination file %(path)s contains wrong result. Expected %(expected)r Found %(result)r(REtFalse(RR7R@RB((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyt checkFill‚scCsqtii|ƒ}d|}|i||ƒtii|dƒ}tii|ƒ}d|}|i||ƒ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%R7R8R<tjoin(RR7R8RtinitPath((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pytcheckSubdirPyInit‹s  cCs0tii|ƒ}d|}|i||ƒdS(s>Verify 'path' does not exist. (To check --nobackup.) s-backup file exists in spite of --nobackup: %sN(R%R7R8tfailIf(RR7R8R((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyt checkNoBackup˜s cCs›tidƒ}|p|S|idƒ}|idƒ}xR|D]J}|tii|d}tii|ƒodi|g|dƒSq@Wdi|ƒS(NtPATHt t:ii(R%tgetenvtsplitR7tseptisfileRI(RRtpathstpartstp((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pytlocate_commandŸscCsXti|ƒ\}}|iƒ|iƒ}|iƒ}|djo d}n||fS(Ni(R%tpopen4R.R=tNone(RRt_int_outtoutputtrc((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pytassertWin32Subprocess«s     cCsc|i|ƒ}t|dtiƒ}|iiƒ|iiƒ}|iƒ}|iiƒ||fS(Ntenv( RXRR%tenvironRR.RR=twait(RRtprocessR]tstatus((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pytassertPosixSubprocess´s   cCs“d\}}tidjo|i|ƒ\}}n|i|ƒ\}}|p!|i|dd||fƒn|i|dd||fƒ|S(Ntwin32isLSubprocess exited with a non-zero status (%d) %ssHSubprocess exited with a zero status (%d) %s(NN(RZRtplatformR_RetfailUnlessEqualt failIfEqual(RRtnonzeroRdR]((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pytassertSubprocess½s   icCsY|i|ƒ}|dj o9d||f}|i|ƒdj}|i||ƒ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(RkRZR>R<(RRtexpectedStatustexpectedOutputSubstringR]Rt substringTest((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pytgoÌs   (Rschild/grandkid(sa.tmpls child/a.tmplschild/grandkid/a.tmplN(RRt__doc__R*R+R,RGt expectErrorR R3R9RERFRHRKRMRXR_ReRkRZRo(((sB/usr/lib64/python2.6/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(RRRpR*R+R,(((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyRrßstOneFilecBs#eZd„Zd„Zd„ZRS(cCs|idƒ|idƒdS(Nscheetah compile a.tmplsa.py(RoRF(R((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyt testCompileìs cCs|idƒ|idƒdS(Nscheetah fill a.tmplsa.html(RoRH(R((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyttestFillðs cCs|idƒ|idƒdS(Nscheetah fill --oext txt a.tmplsa.txt(RoRH(R((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyttestTextôs (RRRuRvRw(((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyRtës  tOneFileNoExtensioncBs#eZd„Zd„Zd„ZRS(cCs|idƒ|idƒdS(Nscheetah compile asa.py(RoRF(R((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyRuús cCs|idƒ|idƒdS(Nscheetah fill asa.html(RoRH(R((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyRvþs cCs|idƒ|idƒdS(Nscheetah fill --oext txt asa.txt(RoRH(R((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyRws (RRRuRvRw(((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyRxùs  t SplatTmplcBs#eZd„Zd„Zd„ZRS(cCs|idƒ|idƒdS(Nscheetah compile *.tmplsa.py(RoRF(R((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyRus cCs|idƒ|idƒdS(Nscheetah fill *.tmplsa.html(RoRH(R((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyRv s cCs|idƒ|idƒdS(Nscheetah fill --oext txt *.tmplsa.txt(RoRH(R((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyRws (RRRuRvRw(((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyRys  tThreeFilesWithSubdirectoriescBs#eZd„Zd„Zd„ZRS(cCs8|idƒ|idƒ|idƒ|idƒdS(Ns9cheetah compile a.tmpl child/a.tmpl child/grandkid/a.tmplsa.pys child/a.pyschild/grandkid/a.py(RoRF(R((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyRus   cCs8|idƒ|idƒ|idƒ|idƒdS(Ns6cheetah fill a.tmpl child/a.tmpl child/grandkid/a.tmplsa.htmls child/a.htmlschild/grandkid/a.html(RoRH(R((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyRvs   cCs8|idƒ|idƒ|idƒ|idƒdS(NsAcheetah fill --oext txt a.tmpl child/a.tmpl child/grandkid/a.tmplsa.txts child/a.txtschild/grandkid/a.txt(RoRH(R((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyRw!s   (RRRuRvRw(((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyRzs  t'ThreeFilesWithSubdirectoriesNoExtensioncBs#eZd„Zd„Zd„ZRS(cCs8|idƒ|idƒ|idƒ|idƒdS(Ns*cheetah compile a child/a child/grandkid/asa.pys child/a.pyschild/grandkid/a.py(RoRF(R((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyRu)s   cCs8|idƒ|idƒ|idƒ|idƒdS(Ns'cheetah fill a child/a child/grandkid/asa.htmls child/a.htmlschild/grandkid/a.html(RoRH(R((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyRv/s   cCs8|idƒ|idƒ|idƒ|idƒdS(Ns2cheetah fill --oext txt a child/a child/grandkid/asa.txts child/a.txtschild/grandkid/a.txt(RoRH(R((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyRw5s   (RRRuRvRw(((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyR{(s  tSplatTmplWithSubdirectoriescBs#eZd„Zd„Zd„ZRS(cCs8|idƒ|idƒ|idƒ|idƒdS(Ns9cheetah compile *.tmpl child/*.tmpl child/grandkid/*.tmplsa.pys child/a.pyschild/grandkid/a.py(RoRF(R((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyRu=s   cCs8|idƒ|idƒ|idƒ|idƒdS(Ns6cheetah fill *.tmpl child/*.tmpl child/grandkid/*.tmplsa.htmls child/a.htmlschild/grandkid/a.html(RoRH(R((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyRvCs   cCs8|idƒ|idƒ|idƒ|idƒdS(NsAcheetah fill --oext txt *.tmpl child/*.tmpl child/grandkid/*.tmplsa.txts child/a.txtschild/grandkid/a.txt(RoRH(R((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyRwIs   (RRRuRvRw(((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyR|<s  tOneFileWithOdircBs#eZd„Zd„Zd„ZRS(cCs+|idƒ|idƒ|idƒdS(Ns"cheetah compile --odir DEST a.tmpltDESTs DEST/a.py(RoRKRF(R((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyRuQs  cCs|idƒ|idƒdS(Nscheetah fill --odir DEST a.tmpls DEST/a.html(RoRH(R((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyRvVs cCs|idƒ|idƒdS(Ns*cheetah fill --odir DEST --oext txt a.tmpls DEST/a.txt(RoRH(R((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyRwZs (RRRuRvRw(((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyR}Ps  tVarietyWithOdircBs#eZd„Zd„Zd„ZRS(cCs_|idƒ|idƒ|idƒ|idƒ|idƒ|idƒ|idƒ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(RoRKRF(R((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyRu`s      cCs8|idƒ|idƒ|idƒ|idƒdS(Ns=cheetah fill --odir DEST a.tmpl child/a child/grandkid/*.tmpls DEST/a.htmlsDEST/child/a.htmlsDEST/child/grandkid/a.html(RoRH(R((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyRvis   cCs8|idƒ|idƒ|idƒ|idƒdS(NsHcheetah fill --odir DEST --oext txt a.tmpl child/a child/grandkid/*.tmpls DEST/a.txtsDEST/child/a.txtsDEST/child/grandkid/a.txt(RoRH(R((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyRwos   (RRRuRvRw(((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyR_s tRecurseExplicitcBs#eZd„Zd„Zd„ZRS(cCs+|idƒ|idƒ|idƒdS(Nscheetah compile -R childs child/a.pyschild/grandkid/a.py(RoRF(R((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyRuws  cCs+|idƒ|idƒ|idƒdS(Nscheetah fill -R childs child/a.htmlschild/grandkid/a.html(RoRH(R((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyRv|s  cCs+|idƒ|idƒ|idƒdS(Ns cheetah fill -R --oext txt childs child/a.txtschild/grandkid/a.txt(RoRH(R((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyRws  (RRRuRvRw(((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyR€vs  tRecurseImplicitcBs#eZd„Zd„Zd„ZRS(cCs+|idƒ|idƒ|idƒdS(Nscheetah compile -Rs child/a.pyschild/grandkid/a.py(RoRF(R((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyRuˆs  cCs8|idƒ|idƒ|idƒ|idƒdS(Nscheetah fill -Rsa.htmls child/a.htmlschild/grandkid/a.html(RoRH(R((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyRvs   cCs8|idƒ|idƒ|idƒ|idƒdS(Nscheetah fill -R --oext txtsa.txts child/a.txtschild/grandkid/a.txt(RoRH(R((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyRw“s   (RRRuRvRw(((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyR‡s  tRecurseExplicitWIthOdircBs#eZd„Zd„Zd„ZRS(cCsE|idƒ|idƒ|idƒ|idƒ|idƒdS(Ns$cheetah compile -R --odir DEST childs DEST/childsDEST/child/grandkidsDEST/child/a.pysDEST/child/grandkid/a.py(RoRKRF(R((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyRu›s     cCs+|idƒ|idƒ|idƒdS(Ns!cheetah fill -R --odir DEST childsDEST/child/a.htmlsDEST/child/grandkid/a.html(RoRH(R((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyRv¢s  cCs+|idƒ|idƒ|idƒdS(Ns,cheetah fill -R --odir DEST --oext txt childsDEST/child/a.txtsDEST/child/grandkid/a.txt(RoRH(R((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyRw§s  (RRRuRvRw(((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyR‚šs  tFlatcBs#eZd„Zd„Zd„ZRS(cCs|idƒ|idƒdS(Ns#cheetah compile --flat child/a.tmplsa.py(RoRF(R((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyRu®s cCs|idƒ|idƒdS(Ns cheetah fill --flat child/a.tmplsa.html(RoRH(R((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyRv²s cCs|idƒ|idƒdS(Ns+cheetah fill --flat --oext txt child/a.tmplsa.txt(RoRH(R((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyRw¶s (RRRuRvRw(((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyRƒ­s  tFlatRecurseCollisioncBs)eZeZd„Zd„Zd„ZRS(cCs|iddtƒdS(Nscheetah compile -R --flatRj(RkR(R((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyRu¾scCs|iddtƒdS(Nscheetah fill -R --flatRj(RkR(R((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyRvÁscCs|iddtƒdS(Nscheetah fill -R --flatRj(RkR(R((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyRwÄs(RRRRqRuRvRw(((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyR„»s  t IdirRecursecBs#eZd„Zd„Zd„ZRS(cCsE|idƒ|idƒ|idƒ|idƒ|idƒdS(Ns#cheetah compile -R --idir SRC childRschild/grandkids child/a.pyschild/grandkid/a.py(RoRKRF(R((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyRuÉs     cCs+|idƒ|idƒ|idƒdS(Ns cheetah fill -R --idir SRC childs child/a.htmlschild/grandkid/a.html(RoRH(R((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyRvÐs  cCs+|idƒ|idƒ|idƒdS(Ns+cheetah fill -R --idir SRC --oext txt childs child/a.txtschild/grandkid/a.txt(RoRH(R((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyRwÕs  (RRRuRvRw(((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyR…Ès  tIdirOdirRecursecBs#eZd„Zd„Zd„ZRS(cCsE|idƒ|idƒ|idƒ|idƒ|idƒdS(Ns/cheetah compile -R --idir SRC --odir DEST childs DEST/childsDEST/child/grandkidsDEST/child/a.pysDEST/child/grandkid/a.py(RoRKRF(R((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyRuÜs     cCs+|idƒ|idƒ|idƒdS(Ns,cheetah fill -R --idir SRC --odir DEST childsDEST/child/a.htmlsDEST/child/grandkid/a.html(RoRH(R((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyRvãs  cCs+|idƒ|idƒ|idƒdS(Ns7cheetah fill -R --idir SRC --odir DEST --oext txt childsDEST/child/a.txtsDEST/child/grandkid/a.txt(RoRH(R((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyRwès  (RRRuRvRw(((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyR†Ûs  tIdirFlatRecurseCollisioncBs)eZeZd„Zd„Zd„ZRS(cCs|iddtƒdS(Ns$cheetah compile -R --flat --idir SRCRj(RkR(R((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyRuñscCs|iddtƒdS(Ns!cheetah fill -R --flat --idir SRCRj(RkR(R((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyRvôscCs|iddtƒdS(Ns,cheetah fill -R --flat --idir SRC --oext txtRj(RkR(R((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyRw÷s(RRRRqRuRvRw(((sB/usr/lib64/python2.6/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/|idƒ|idƒ|idtƒdS(Ns!cheetah compile --nobackup a.tmplsa.py(RoRMt BACKUP_SUFFIX(R((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyRuÿs  cCs/|idƒ|idƒ|idtƒdS(Nscheetah fill --nobackup a.tmplsa.html(RoRMR‰(R((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyRvs  cCs/|idƒ|idƒ|idtƒdS(Ns)cheetah fill --nobackup --oext txt a.tmplsa.txt(RoRMR‰(R((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyRw s  (RRRpRuRvRw(((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyRˆûs  cCsxtidƒ}t|ƒ}xLtoD|iƒ}|pPn|i|ƒ}|o|idƒGHqqW|iƒdS(sscheetahWrapperFile, string, path of this script. XXX TODO: don't print test where expectError is true. sself\.go\("(.*?)"\)iN(tretcompileR-RtreadlinetsearchtgroupR.(tcheetahWrapperFiletrxR2tlintm((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyt listTestss  cCs@tƒ}|idddddƒ|idddƒ|idddƒ|id d ddƒ|id d ddƒ|id dddƒ|iƒ\}}|io tan|io tan|i ot |i ƒn^t i d3x6dD].}t ||ƒot i i d|ƒqðqðWt i i|ƒtiƒdS(Ns--listtactiontstoretdestR“s --nodeletet store_trues--outputs-es --explains-vs --verboses-qs--quietitexplainRtquiets--(R˜sverbosesquiet(Rt add_optiont parse_argstnodeleteRGR4R]RtOUTPUTR“Rtargvtgetattrtappendtextendtunittesttmain(tparsertoptstfilestopt((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyR£s*       t__main__(1RpR%tos.pathtpdbRŠR5RR"R¢toptparseRtCheetah.CheetahWrapperRt subprocessRRRRt ImportErrortpopen2RR4RGRR‰RtTestCaseRRrRtRxRyRzR{R|R}RR€RR‚RƒR„R…R†R‡RˆR“R£R(((sB/usr/lib64/python2.6/site-packages/Cheetah/Tests/CheetahWrapper.pyt sT           ®