"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Cheetah/Tests/NameMapper.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).

NameMapper.py  (cheetah3-3.2.2):NameMapper.py  (cheetah3-3.2.3)
#!/usr/bin/env python
import sys import sys
import unittest import unittest
from Cheetah.NameMapper import NotFound, \ from Cheetah.NameMapper import NotFound, \
valueForName, valueFromSearchList, valueFromFrame, \ valueForName, valueFromSearchList, valueFromFrame, \
valueFromFrameOrSearchList valueFromFrameOrSearchList
class DummyClass(object): class DummyClass(object):
classVar1 = 123 classVar1 = 123
skipping to change at line 540 skipping to change at line 538
del VFF, VFFSL, VFFSL_2, VFFSL_3, VFFSL_4 del VFF, VFFSL, VFFSL_2, VFFSL_3, VFFSL_4
class MapBuiltins(unittest.TestCase): class MapBuiltins(unittest.TestCase):
def test_int(self): def test_int(self):
from Cheetah.Template import Template from Cheetah.Template import Template
t = Template(''' t = Template('''
#def intify(val) #def intify(val)
#return $int(val) #return $int(val)
#end def''', compilerSettings={'useStackFrames': False}) #end def''', compilerSettings={'useStackFrames': False})
self.assertEqual(5, t.intify('5')) self.assertEqual(5, t.intify('5'))
##################################################
# 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)