def test_min_conflicts(self): result = min_conflicts(self.problem) c = _count_conflicts(self.problem, result) self.assertEqual(c, 0)
def test_count_conflicts_with_added_variable(self): assignment = {'A': 1, 'B': 1} conflicts_count = _count_conflicts(self.problem, assignment, 'C', 3) self.assertEqual(conflicts_count, 4)
def test_count_conflicts(self): assignment = {'A': 1, 'B': 1, 'C': 3} conflicts_count = _count_conflicts(self.problem, assignment) self.assertEqual(conflicts_count, 4)