"Fossies" - the Fresh Open Source Software Archive

Member "cheetah3-3.2.6.post2/Cheetah/Tests/Misc.py" (20 Apr 2021, 456 Bytes) of package /linux/www/cheetah3-3.2.6.post2.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Python source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. For more information about "Misc.py" see the Fossies "Dox" file reference documentation and the last Fossies "Diffs" side-by-side code changes report: 3-3.2.2_vs_3-3.2.3.

    1 import unittest
    2 
    3 from Cheetah import SettingsManager
    4 
    5 
    6 class SettingsManagerTests(unittest.TestCase):
    7     def test_mergeDictionaries(self):
    8         left = {'foo': 'bar', 'abc': {'a': 1, 'b': 2, 'c': (3,)}}
    9         right = {'xyz': (10, 9)}
   10         expect = {
   11             'xyz': (10, 9), 'foo': 'bar', 'abc': {'a': 1, 'c': (3,), 'b': 2}
   12         }
   13         result = SettingsManager.mergeNestedDictionaries(left, right)
   14         self.assertEqual(result, expect)