"Fossies" - the Fresh Open Source Software Archive  

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

Misc.py  (cheetah3-3.2.2):Misc.py  (cheetah3-3.2.3)
#!/usr/bin/env python
import unittest import unittest
from Cheetah import SettingsManager from Cheetah import SettingsManager
class SettingsManagerTests(unittest.TestCase): class SettingsManagerTests(unittest.TestCase):
def test_mergeDictionaries(self): def test_mergeDictionaries(self):
left = {'foo': 'bar', 'abc': {'a': 1, 'b': 2, 'c': (3,)}} left = {'foo': 'bar', 'abc': {'a': 1, 'b': 2, 'c': (3,)}}
right = {'xyz': (10, 9)} right = {'xyz': (10, 9)}
expect = { expect = {
'xyz': (10, 9), 'foo': 'bar', 'abc': {'a': 1, 'c': (3,), 'b': 2} 'xyz': (10, 9), 'foo': 'bar', 'abc': {'a': 1, 'c': (3,), 'b': 2}
} }
result = SettingsManager.mergeNestedDictionaries(left, right) result = SettingsManager.mergeNestedDictionaries(left, right)
self.assertEqual(result, expect) self.assertEqual(result, expect)
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)