summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorR. Tyler Ballance <tyler@slide.com>2009-06-28 14:14:38 +0800
committerJames Abbatiello <abbeyj@gmail.com>2009-06-29 00:39:17 +0800
commit81cc41cabf295e6e71f5a89e6d18c286cf8475a6 (patch)
tree921fb4bb0982644f8b55821045d0e79d3698f18c
parent23214cb3dec524e2452faf508597f5b1e498fe16 (diff)
downloadpython-cheetah-81cc41cabf295e6e71f5a89e6d18c286cf8475a6.tar.gz
Add another LongCompile test that initializes and executes the template as well
Signed-off-by: James Abbatiello <abbeyj@gmail.com>
-rw-r--r--src/Tests/Performance.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/Tests/Performance.py b/src/Tests/Performance.py
index c74e4c3..db721f9 100644
--- a/src/Tests/Performance.py
+++ b/src/Tests/Performance.py
@@ -187,7 +187,10 @@ class LongCompileTest(PerformanceTest):
<body>
$header()
- This is just some stupid page!
+ #for $i in $xrange(10)
+ This is just some stupid page!
+ <br/>
+ #end for
<br/>
$footer()
@@ -196,12 +199,18 @@ class LongCompileTest(PerformanceTest):
#end def
'''
- template = self.compile(template)
+ return self.compile(template)
class LongCompile_CompilerSettingsTest(LongCompileTest):
def compile(self, template):
return Cheetah.Template.Template.compile(template, keepRefToGeneratedCode=False,
compilerSettings={'useStackFrames' : True, 'useAutocalling' : True})
+
+class LongCompileAndRun(LongCompileTest):
+ def performanceSample(self):
+ template = super(LongCompileAndRun, self).performanceSample()
+ template = template(searchList=[{'title' : 'foo'}])
+ template = template.respond()
if __name__ == '__main__':