Ñò 9ÝoLc@s(ddkZddkZddkZddkZeideidZZeefZd„Z de fd„ƒYZ de fd„ƒYZ d eifd „ƒYZd eifd „ƒYZd eifd„ƒYZdeifd„ƒYZdeifd„ƒYZedjoeiƒndS(iÿÿÿÿNiicCstdjo tdjS(sJ Python 2.3 is still supported by Cheetah, but doesn't support decorators ii(tmajorVertminorVer(((s?/usr/lib64/python2.6/site-packages/Cheetah/Tests/Regressions.pyt isPython23 stGetAttrExceptioncBseZRS((t__name__t __module__(((s?/usr/lib64/python2.6/site-packages/Cheetah/Tests/Regressions.pyRstCustomGetAttrClasscBseZd„ZRS(cCstd|ƒ‚dS(NsFAIL, %s(R(tselftname((s?/usr/lib64/python2.6/site-packages/Cheetah/Tests/Regressions.pyt __getattr__s(RRR (((s?/usr/lib64/python2.6/site-packages/Cheetah/Tests/Regressions.pyRst GetAttrTestcBs eZdZd„Zd„ZRS(sŠ Test for an issue occurring when __getatttr__() raises an exception causing NameMapper to raise a NotFound exception cCsVtƒ}y |iGHWn-tj o }dS|id|ƒnX|idƒdS(NsInvalid exception raised: %ss#Should have had an exception raised(RtattrRtfail(Rtote((s?/usr/lib64/python2.6/site-packages/Cheetah/Tests/Regressions.pyttest_ValidExceptions  cCsZd}tiii|dhdtƒ}|dhtƒd6gƒ}|it|iƒdS(NsJ #def raiseme() $obj.attr #end deftcompilerSettingstkeepRefToGeneratedCodet searchListtobj(tCheetahtTemplatetcompiletTrueRtfailUnlessRaisesRtraiseme(Rttemplate((s?/usr/lib64/python2.6/site-packages/Cheetah/Tests/Regressions.pyttest_NotFoundException's!(RRt__doc__RR(((s?/usr/lib64/python2.6/site-packages/Cheetah/Tests/Regressions.pyR s tInlineImportTestcBs5eZd„Zd„Zd„Zd„Zd„ZRS(cCsPd}tiii|dhtd6dtƒ}|dhgƒ}|iƒ}dS(sÔ Verify that a bug introduced in v2.1.0 where an inline: #from module import class would result in the following code being generated: import class sÐ #def myfunction() #if True #from os import path #return 17 Hello! #end if #end def RtuseLegacyImportModeRRN(RRRtFalseRt myfunction(RRtrc((s?/usr/lib64/python2.6/site-packages/Cheetah/Tests/Regressions.pyttest_FromFooImportThing5s ( cCsDd}tiii|dhtd6dtƒ}|dhgƒ}dS(Ns¿ #try #import invalidmodule #except #set invalidmodule = dict(FOO='BAR!') #end try $invalidmodule.FOO RRRR(RRRRR(RR((s?/usr/lib64/python2.6/site-packages/Cheetah/Tests/Regressions.pyttest_ImportFailModuleMs (cCs9d}|ittiii|dhtd6dtƒdS(Nsf #from invalid import fail This should totally $fail RRR(Rt ImportErrorRRRRR(RR((s?/usr/lib64/python2.6/site-packages/Cheetah/Tests/Regressions.pyttest_ProperImportOfBadModule]scCs&d}|ittiii|ƒdS(Ns> #extends FakeyTemplate Boo! (RR$RRR(RR((s?/usr/lib64/python2.6/site-packages/Cheetah/Tests/Regressions.pyttest_AutoImportingescCs9d}|ittiii|dhtd6dtƒdS(Ns< ### ### I like comments before import ### #extends Foo Bar RRR(RR$RRRR(RR((s?/usr/lib64/python2.6/site-packages/Cheetah/Tests/Regressions.pyttest_StuffBeforeImport_Legacyms(RRR"R#R%R&R'(((s?/usr/lib64/python2.6/site-packages/Cheetah/Tests/Regressions.pyR4s     tMantis_Issue_11_Regression_TestcBs eZdZd„Zd„ZRS(s— Test case for bug outlined in Mantis issue #11: Output: Traceback (most recent call last): File "test.py", line 12, in t.respond() File "DynamicallyCompiledCheetahTemplate.py", line 86, in respond File "/usr/lib64/python2.6/cgi.py", line 1035, in escape s = s.replace("&", "&") # Must be done first! cCsOddk}tiiddh|id6dd6gƒ}|it|iƒdS(Niÿÿÿÿs$escape($request)Rtescapetfoobartrequest(tcgiRRR)RtAttributeErrortrespond(RR,R((s?/usr/lib64/python2.6/site-packages/Cheetah/Tests/Regressions.pyttest_FailingBehavior„s ,c CsIddk}tiiddh|id6dd6gdhtd6ƒ}dS( Niÿÿÿÿs$escape($request)RR)R*R+RtprioritizeSearchListOverSelf(R,RRR)R(RR,R((s?/usr/lib64/python2.6/site-packages/Cheetah/Tests/Regressions.pyttest_FailingBehaviorWithSetting‹s  (RRRR/R1(((s?/usr/lib64/python2.6/site-packages/Cheetah/Tests/Regressions.pyR(xs  tMantis_Issue_21_Regression_TestcBseZdZd„ZRS(sò Test case for bug outlined in issue #21 Effectively @staticmethod and @classmethod decorated methods in templates don't properly define the _filter local, which breaks when using the NameMapper cCs.tƒodSd}tiii|ƒ}dS(Nsz #@staticmethod #def testMethod() This is my $output #end def (RRRR(RR((s?/usr/lib64/python2.6/site-packages/Cheetah/Tests/Regressions.pytrunTestœs  (RRRR3(((s?/usr/lib64/python2.6/site-packages/Cheetah/Tests/Regressions.pyR2“stMantis_Issue_22_Regression_TestcBs eZdZd„Zd„ZRS(s Test case for bug outlined in issue #22 When using @staticmethod and @classmethod in conjunction with the #filter directive the generated code for the #filter is reliant on the `self` local, breaking the function cCs2dStƒodSd}tiii|ƒ}dS(Ns· #@staticmethod #def testMethod() #filter None This is my $output #end filter #end def (RRRR(RR((s?/usr/lib64/python2.6/site-packages/Cheetah/Tests/Regressions.pyttest_NoneFilter³s  cCs2dStƒodSd}tiii|ƒ}dS(Ns¹ #@staticmethod #def testMethod() #filter Filter This is my $output #end filter #end def (RRRR(RR((s?/usr/lib64/python2.6/site-packages/Cheetah/Tests/Regressions.pyttest_DefinedFilterÄs   (RRRR5R6(((s?/usr/lib64/python2.6/site-packages/Cheetah/Tests/Regressions.pyR4ªs t__main__(tCheetah.NameMapperRtCheetah.Templatetsystunittestt version_infoRRt versionTupleRt ExceptionRtobjectRtTestCaseR RR(R2R4Rtmain(((s?/usr/lib64/python2.6/site-packages/Cheetah/Tests/Regressions.pyts      DK