Ejemplo n.º 1
0
 def test_one_least_misery(self):
     additive = Strategies(test_data.movie_set_1, test_data.data_set_1)
     movie = additive.least_misery()
     max_score = additive.minimum_values()
     self.assertEqual(max_score, [5, 5, 4])
     self.assertEqual(movie, ['A', 'B'])
Ejemplo n.º 2
0
 def test_six_least_misery(self):
     additive = Strategies(test_data.movie_set_5_6, test_data.data_set_6)
     movie = additive.least_misery()
     max_score = additive.minimum_values()
     self.assertEqual(max_score, [1, 4, 2, 6, 7, 8, 5, 6, 3, 6])
     self.assertEqual(movie, "F")
Ejemplo n.º 3
0
 def test_five_least_misery(self):
     additive = Strategies(test_data.movie_set_5_6, test_data.data_set_5)
     movie = additive.least_misery()
     max_score = additive.minimum_values()
     self.assertEqual(max_score, [5, 1, 6, 6, 8, 8, 3, 4, 3, 6])
     self.assertEqual(movie, ['E', 'F'])
Ejemplo n.º 4
0
 def test_four_least_misery(self):
     additive = Strategies(test_data.movie_set_4, test_data.data_set_4)
     movie = additive.least_misery()
     max_score = additive.minimum_values()
     self.assertEqual(max_score, [1, 3, 1, 3])
     self.assertEqual(movie, ['B', 'D'])
Ejemplo n.º 5
0
 def test_three_least_misery(self):
     additive = Strategies(test_data.movie_set_3, test_data.data_set_3)
     movie = additive.least_misery()
     max_score = additive.minimum_values()
     self.assertEqual(max_score, [1, 1, 1])
     self.assertEqual(movie, ["A", "B", "C"])
Ejemplo n.º 6
0
 def test_two_least_misery(self):
     additive = Strategies(test_data.movie_set_2, test_data.data_set_2)
     movie = additive.least_misery()
     max_score = additive.minimum_values()
     self.assertEqual(max_score, [2, 4])
     self.assertEqual(movie, "B")