def test_getConflicts(self): confA = Config() confA.readConfigFile(self.configA.name) confB = Config() confB.readConfigFile(self.configB.name) conflicts = confA.getConflicts(confB) self.assertIn("CONFIG_B",conflicts) self.assertIn("CONFIG_C",conflicts) self.assertIn("CONFIG_M",conflicts)
def test_getConflicts(self): confA = Config() confA.readConfigFile(self.configA.name) confB = Config() confB.readConfigFile(self.configB.name) conflicts = confA.getConflicts(confB) self.assertIn("CONFIG_B", conflicts) self.assertIn("CONFIG_C", conflicts) self.assertIn("CONFIG_M", conflicts)
def verify(self, expanded_config='.config'): """ verifies that the given expanded configuration satisfies the constraints of the given partial configuration. @return (all_items, violators) all_items: set of all items in partial configuration violators: list of items that violate the partial selection """ partial_config = Config(self.kconfig) config = Config(expanded_config) conflicts = config.getConflicts(partial_config) return (partial_config.keys(), conflicts)