def _candidate_owners(self, path): build_file = BuildFile(get_buildroot(), relpath=os.path.dirname(path), must_exist=False) if build_file.exists(): yield build_file for sibling in build_file.siblings(): yield sibling for ancestor in build_file.ancestors(): yield ancestor
def _candidate_owners(self, path): build_file = BuildFile(get_buildroot(), relpath=os.path.dirname(path), must_exist=False) if build_file.exists(): yield build_file for sibling in build_file.siblings(): yield sibling for ancestor in build_file.ancestors(): yield ancestor
def test_buildfile_with_dir_must_exist_false(self): # We should be able to create a BuildFile against a dir called BUILD if must_exist is false. # This is used in what_changed for example. buildfile = BuildFile(BuildFileTest.root_dir, 'grandparent/BUILD', must_exist=False) self.assertFalse(buildfile.exists())
def test_buildfile_with_dir_must_exist_false(self): # We should be able to create a BuildFile against a dir called BUILD if must_exist is false. # This is used in what_changed for example. buildfile = BuildFile(BuildFileTest.root_dir, 'grandparent/BUILD', must_exist=False) self.assertFalse(buildfile.exists())