Esempio n. 1
0
 def test_is_open_sourced_false(self):
     for p in [
             'no', 'no/file.c', 'selective/xfoobar.c',
             'selective/subdir2/file.c'
     ]:
         self.assertFalse(
             open_source.is_open_sourced(os.path.join(_PATH_PREFIX, p)))
Esempio n. 2
0
 def test_is_open_sourced_true(self):
     for p in [
             'yes', 'yes/anything.c', 'selective/foobar.c',
             'selective/foobar.cpp', 'selective/subdir/file.c'
     ]:
         self.assertTrue(
             open_source.is_open_sourced(os.path.join(_PATH_PREFIX, p)))
Esempio n. 3
0
 def should_run(self, path):
     # TODO(crbug.com/411195): Clean up all copyrights so we can turn this on
     # everywhere.  Currently our priority is to have the open sourced
     # copyrights all be consistent.
     return path.startswith('src/') or open_source.is_open_sourced(path)
Esempio n. 4
0
 def should_run(self, path):
     # TODO(crbug.com/411195): Clean up all copyrights so we can turn this on
     # everywhere.  Currently our priority is to have the open sourced
     # copyrights all be consistent.
     return path.startswith("src/") or open_source.is_open_sourced(path)
Esempio n. 5
0
 def test_is_third_party_open_sourced_true(self):
   for p in ['third_party/android']:
     self.assertTrue(open_source.is_open_sourced(p))
Esempio n. 6
0
 def test_is_open_sourced_false(self):
   for p in ['no', 'no/file.c', 'selective/xfoobar.c',
             'selective/subdir2/file.c']:
     self.assertFalse(open_source.is_open_sourced(
         os.path.join(_PATH_PREFIX, p)))
Esempio n. 7
0
 def test_is_open_sourced_true(self):
   for p in ['yes', 'yes/anything.c', 'selective/foobar.c',
             'selective/foobar.cpp', 'selective/subdir/file.c']:
     self.assertTrue(open_source.is_open_sourced(
         os.path.join(_PATH_PREFIX, p)))
Esempio n. 8
0
 def test_is_third_party_open_sourced_true(self):
     for p in ['third_party/android']:
         self.assertTrue(open_source.is_open_sourced(p))