"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Cheetah/Tests/SyntaxAndOutput.py" between
cheetah3-3.2.5.tar.gz and cheetah3-3.2.6.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).

SyntaxAndOutput.py  (cheetah3-3.2.5):SyntaxAndOutput.py  (cheetah3-3.2.6)
skipping to change at line 2987 skipping to change at line 2987
""" """
self.verify("$getVar('bogus', 1234)", self.verify("$getVar('bogus', 1234)",
"1234") "1234")
def test5(self): def test5(self):
"""$getVar('$bogus', 1234) """$getVar('$bogus', 1234)
""" """
self.verify("$getVar('$bogus', 1234)", self.verify("$getVar('$bogus', 1234)",
"1234") "1234")
def test6(self):
"""$getVar('$') raises ValueError
"""
with self.assertRaises(ValueError):
self.verify("$getVar('$')", "never get here")
class MiscComplexSyntax(OutputTest): class MiscComplexSyntax(OutputTest):
def test1(self): def test1(self):
"""Complex use of {},[] and () in a #set expression """Complex use of {},[] and () in a #set expression
---- ----
#set $c = {'A':0}[{}.get('a', {'a' : 'A'}['a'])] #set $c = {'A':0}[{}.get('a', {'a' : 'A'}['a'])]
$c $c
""" """
self.verify("#set $c = {'A':0}[{}.get('a', {'a' : 'A'}['a'])]\n$c", self.verify("#set $c = {'A':0}[{}.get('a', {'a' : 'A'}['a'])]\n$c",
"0") "0")
 End of changes. 1 change blocks. 
0 lines changed or deleted 6 lines changed or added

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