"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Cheetah/Tests/Template.py" between
cheetah3-3.2.2.tar.gz and cheetah3-3.2.3.tar.gz

About: Cheetah3 is a template engine and code generation tool for e.g. for Web development or Java, SQL, LaTeX, form email ... (written in Python).

Template.py  (cheetah3-3.2.2):Template.py  (cheetah3-3.2.3)
#!/usr/bin/env python
import os import os
import os.path import os.path
import sys import sys
import shutil import shutil
import tempfile import tempfile
import unittest import unittest
from Cheetah.Template import Template from Cheetah.Template import Template
from Cheetah.compat import unicode from Cheetah.compat import unicode
skipping to change at line 333 skipping to change at line 331
class SubclassSearchListTest(TemplateTest): class SubclassSearchListTest(TemplateTest):
''' '''
Verify that if we subclass Template, we can still Verify that if we subclass Template, we can still
use attributes on that subclass in the searchList use attributes on that subclass in the searchList
''' '''
def runTest(self): def runTest(self):
class Sub(Template): class Sub(Template):
greeting = 'Hola' greeting = 'Hola'
tmpl = Sub('''When we meet, I say "${greeting}"''') tmpl = Sub('''When we meet, I say "${greeting}"''')
self.assertEqual(unicode(tmpl), 'When we meet, I say "Hola"') self.assertEqual(unicode(tmpl), 'When we meet, I say "Hola"')
##################################################
# if run from the command line ##
if __name__ == '__main__':
unittest.main()
 End of changes. 2 change blocks. 
2 lines changed or deleted 0 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)