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)))
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)))
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)
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)
def test_is_third_party_open_sourced_true(self): for p in ['third_party/android']: self.assertTrue(open_source.is_open_sourced(p))
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)))
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)))