"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Cheetah/Tests/NameMapper.py" between
cheetah3-3.1.0.tar.gz and cheetah3-3.2.0.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.1.0):NameMapper.py  (cheetah3-3.2.0)
#!/usr/bin/env python #!/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
def __init__(self): def __init__(self):
self.instanceVar1 = 123 self.instanceVar1 = 123
def __str__(self): def __str__(self):
return 'object' return 'object'
skipping to change at line 74 skipping to change at line 74
'nestedFunc': dummyFunc, 'nestedFunc': dummyFunc,
}, },
'aClass': DummyClass, 'aClass': DummyClass,
'aFunc': dummyFunc, 'aFunc': dummyFunc,
'anObj': DummyClass(), 'anObj': DummyClass(),
'anObjThatRaises': DummyClassGetAttrRaises(), 'anObjThatRaises': DummyClassGetAttrRaises(),
'aMeth': DummyClass().meth1, 'aMeth': DummyClass().meth1,
'none': None, 'none': None,
'emptyString': '', 'emptyString': '',
'funcThatRaises': funcThatRaises, 'funcThatRaises': funcThatRaises,
} }
autoCallResults = {'aFunc': 'Scooby', autoCallResults = {'aFunc': 'Scooby',
'aMeth': 'doo', 'aMeth': 'doo',
} }
results = testNamespace.copy() results = testNamespace.copy()
results.update({'anObj.meth1': 'doo', results.update({'anObj.meth1': 'doo',
'aDict.one': 'item1', 'aDict.one': 'item1',
'aDict.nestedDict': testNamespace['aDict']['nestedDict'], 'aDict.nestedDict': testNamespace['aDict']['nestedDict'],
'aDict.nestedDict.one': 'nestedItem1', 'aDict.nestedDict.one': 'nestedItem1',
 End of changes. 2 change blocks. 
3 lines changed or deleted 3 lines changed or added

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