"Fossies" - the Fresh Open Source Software Archive  

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

Analyzer.py  (cheetah3-3.2.2):Analyzer.py  (cheetah3-3.2.3)
#!/usr/bin/env python
import unittest import unittest
from Cheetah import DirectiveAnalyzer from Cheetah import DirectiveAnalyzer
class AnalyzerTests(unittest.TestCase): class AnalyzerTests(unittest.TestCase):
def test_set(self): def test_set(self):
template = ''' template = '''
#set $foo = "bar" #set $foo = "bar"
Hello ${foo}! Hello ${foo}!
''' '''
skipping to change at line 24 skipping to change at line 22
self.assertEqual(1, calls.get('set')) self.assertEqual(1, calls.get('set'))
def test_compilersettings(self): def test_compilersettings(self):
template = ''' template = '''
#compiler-settings #compiler-settings
useNameMapper = False useNameMapper = False
#end compiler-settings #end compiler-settings
''' '''
calls = DirectiveAnalyzer.analyze(template) calls = DirectiveAnalyzer.analyze(template)
self.assertEqual(1, calls.get('compiler-settings')) self.assertEqual(1, calls.get('compiler-settings'))
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)