Пример #1
0
 def test__only_test_resources(self):
   deduped_sources = Project.dedup_sources([
     SourceSet('foo', 'bar', 'baz', is_test=True, resources_only=True),
     SourceSet('foo', 'bar', 'baz', is_test=True, resources_only=True),
   ])
   self.assert_dedup(SourceSet('foo', 'bar', 'baz', is_test=True, resources_only=True),
                     deduped_sources)
Пример #2
0
 def test__only_test_resources(self):
   deduped_sources = Project.dedup_sources([
     SourceSet('foo', 'bar', 'baz', is_test=True, resources_only=True),
     SourceSet('foo', 'bar', 'baz', is_test=True, resources_only=True),
   ])
   self.assert_dedup(SourceSet('foo', 'bar', 'baz', is_test=True, resources_only=True),
                     deduped_sources)
Пример #3
0
 def test_dedup_sources_resource_and_code(self):
     """Show that a non-resources-only source set turns off the resources_only flag"""
     deduped_sources = Project.dedup_sources([
         SourceSet('foo', 'bar', 'baz', resources_only=True),
         SourceSet('foo', 'bar', 'baz'),
         SourceSet('foo', 'bar', 'baz', resources_only=True),
     ])
     self.assert_dedup(SourceSet('foo', 'bar', 'baz'), deduped_sources)
Пример #4
0
 def test_dedup_test_resources(self):
   """Show that competting is_test values on a resources-only source set turns off is_test"""
   deduped_sources = Project.dedup_sources([
     SourceSet('foo', 'bar', 'baz', is_test=True, resources_only=True),
     SourceSet('foo', 'bar', 'baz', is_test= False, resources_only=True),
     SourceSet('foo', 'bar', 'baz', is_test=True, resources_only=True),
   ])
   self.assert_dedup(SourceSet('foo', 'bar', 'baz', resources_only=True), deduped_sources)
Пример #5
0
 def test_dedup_test_sources(self):
   """Show that a is_test on a non resources_only source set turns on is_test"""
   deduped_sources = Project.dedup_sources([
     SourceSet('foo', 'bar', 'baz', is_test=True),
     SourceSet('foo', 'bar', 'baz'),
     SourceSet('foo', 'bar', 'baz', is_test=True),
   ])
   self.assert_dedup(SourceSet('foo', 'bar', 'baz', is_test=True), deduped_sources)
Пример #6
0
 def test_dedup_sources_resource_and_code(self):
   """Show that a non-resources-only source set turns off the resources_only flag"""
   deduped_sources = Project.dedup_sources([
     SourceSet('foo', 'bar', 'baz', resources_only=True),
     SourceSet('foo', 'bar', 'baz'),
     SourceSet('foo', 'bar', 'baz', resources_only=True),
   ])
   self.assert_dedup(SourceSet('foo', 'bar', 'baz'), deduped_sources)
Пример #7
0
 def test_all_together(self):
   deduped_sources = Project.dedup_sources([
     SourceSet('foo', 'bar', 'baz', is_test=True, resources_only=False),
     SourceSet('foo', 'bar', 'baz', is_test=True, resources_only=True),
     SourceSet('foo', 'bar', 'baz', is_test=False, resources_only=True),
     SourceSet('foo', 'bar', 'baz', is_test=False, resources_only=False),
   ])
   self.assert_dedup(SourceSet('foo', 'bar', 'baz', is_test=True), deduped_sources)
Пример #8
0
 def test_dedup_test_resources(self):
   """Show that competting is_test values on a resources-only source set turns off is_test"""
   deduped_sources = Project.dedup_sources([
     SourceSet('foo', 'bar', 'baz', is_test=True, resources_only=True),
     SourceSet('foo', 'bar', 'baz', is_test= False, resources_only=True),
     SourceSet('foo', 'bar', 'baz', is_test=True, resources_only=True),
   ])
   self.assert_dedup(SourceSet('foo', 'bar', 'baz', resources_only=True), deduped_sources)
Пример #9
0
 def test_dedup_test_sources(self):
   """Show that a is_test on a non resources_only source set turns on is_test"""
   deduped_sources = Project.dedup_sources([
     SourceSet('foo', 'bar', 'baz', is_test=True),
     SourceSet('foo', 'bar', 'baz'),
     SourceSet('foo', 'bar', 'baz', is_test=True),
   ])
   self.assert_dedup(SourceSet('foo', 'bar', 'baz', is_test=True), deduped_sources)
Пример #10
0
 def test_all_together(self):
   deduped_sources = Project.dedup_sources([
     SourceSet('foo', 'bar', 'baz', is_test=True, resources_only=False),
     SourceSet('foo', 'bar', 'baz', is_test=True, resources_only=True),
     SourceSet('foo', 'bar', 'baz', is_test=False, resources_only=True),
     SourceSet('foo', 'bar', 'baz', is_test=False, resources_only=False),
   ])
   self.assert_dedup(SourceSet('foo', 'bar', 'baz', is_test=True), deduped_sources)
Пример #11
0
 def test_dedup_sources_simple(self):
     self.assertEquals([
         SourceSet('foo', 'bar', ''),
         SourceSet('foo', 'bar', 'baz'),
         SourceSet('foo', 'bar', 'foobar')
     ],
                       Project.dedup_sources([
                           SourceSet('foo', 'bar', ''),
                           SourceSet('foo', 'bar', 'foobar'),
                           SourceSet('foo', 'bar', 'baz'),
                           SourceSet('foo', 'bar', 'baz'),
                           SourceSet('foo', 'bar', 'foobar'),
                           SourceSet('foo', 'bar', 'foobar'),
                           SourceSet('foo', 'bar', 'baz'),
                       ]))
Пример #12
0
 def test_dedup_sources_simple(self):
   self.assertEquals([
     SourceSet('foo', 'bar', ''),
     SourceSet('foo', 'bar', 'baz'),
     SourceSet('foo', 'bar', 'foobar')
   ],
   Project.dedup_sources([
     SourceSet('foo', 'bar', ''),
     SourceSet('foo', 'bar', 'foobar'),
     SourceSet('foo', 'bar', 'baz'),
     SourceSet('foo', 'bar', 'baz'),
     SourceSet('foo', 'bar', 'foobar'),
     SourceSet('foo', 'bar', 'foobar'),
     SourceSet('foo', 'bar', 'baz'),
   ]))