示例#1
0
 def test_create_stubs(self):
   stubs = {
       'foo': 'bar',
       'bar': 'baz',
   }
   load_symbols = [
       load_extractor.LoadSymbol('//foo:bar.bzl', 'bar_library', None),
       load_extractor.LoadSymbol('//foo:bar.bzl', 'foo_bar_binary',
                                 'bar_binary'),
   ]
   expected = {
       'foo': 'bar',
       'bar': 'baz',
       'bar_library': '',
       'bar_binary': '',
       }
   self.assertEqual(expected, rule_extractor.create_stubs(stubs, load_symbols))
 def test_create_stubs(self):
     stubs = {
         'foo': 'bar',
         'bar': 'baz',
     }
     load_symbols = [
         load_extractor.LoadSymbol('//foo:bar.bzl', 'bar_library', None),
         load_extractor.LoadSymbol('//foo:bar.bzl', 'foo_bar_binary',
                                   'bar_binary'),
     ]
     expected = {
         'foo': 'bar',
         'bar': 'baz',
         'bar_library': '',
         'bar_binary': '',
     }
     self.assertEqual(expected,
                      rule_extractor.create_stubs(stubs, load_symbols))