示例#1
0
 def test_merge_two_empty(self):
     # Flat stay flat. Pylint is confused about union() return type.
     # pylint: disable=E1103
     actual = merge_isolate.union(
         merge_isolate.union(merge_isolate.Configs([]),
                             merge_isolate.load_gyp({})),
         merge_isolate.load_gyp({})).flatten()
     self.assertEquals({}, actual)
示例#2
0
 def test_load_two_conditions(self):
     linux = {
         'conditions': [
             [
                 'OS=="linux"', {
                     'variables': {
                         'isolate_dependency_tracked': [
                             'file_linux',
                             'file_common',
                         ],
                     },
                 }
             ],
         ],
     }
     mac = {
         'conditions': [
             [
                 'OS=="mac"', {
                     'variables': {
                         'isolate_dependency_tracked': [
                             'file_mac',
                             'file_common',
                         ],
                     },
                 }
             ],
         ],
     }
     expected = {
         'linux': {
             'isolate_dependency_tracked': ['file_common', 'file_linux'],
         },
         'mac': {
             'isolate_dependency_tracked': ['file_common', 'file_mac'],
         },
     }
     # Pylint is confused about union() return type.
     # pylint: disable=E1103
     configs = merge_isolate.union(
         merge_isolate.union(merge_isolate.Configs([]),
                             merge_isolate.load_gyp(linux)),
         merge_isolate.load_gyp(mac)).flatten()
     self.assertEquals(expected, configs)