示例#1
0
 def test_min_conflicts(self):
     result = min_conflicts(self.problem)
     c = _count_conflicts(self.problem, result)
     self.assertEqual(c, 0)
示例#2
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)
示例#3
0
 def test_count_conflicts(self):
     assignment = {'A': 1, 'B': 1, 'C': 3}
     conflicts_count = _count_conflicts(self.problem, assignment)
     self.assertEqual(conflicts_count, 4)
示例#4
0
 def test_min_conflicts(self):
     result = min_conflicts(self.problem)
     c = _count_conflicts(self.problem, result)
     self.assertEqual(c, 0)
示例#5
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)
示例#6
0
 def test_count_conflicts(self):
     assignment = {'A': 1, 'B': 1, 'C': 3}
     conflicts_count = _count_conflicts(self.problem, assignment)
     self.assertEqual(conflicts_count, 4)