예제 #1
0
 def test_apply_crossover_prod_list_blank(self):
     with self.assertRaises(ValueError):
         apply_crossover(1, cand_pop, 1, 1, None)
예제 #2
0
 def test_apply_crossover_hour_limit_neg(self):
     with self.assertRaises(ValueError):
         apply_crossover(1, cand_pop, 1, -1, cand_pop)
예제 #3
0
 def test_apply_crossover_cand_to_repro_blank(self):
     with self.assertRaises(ValueError):
         apply_crossover(1, None, 1, 1, prod_list_full)
예제 #4
0
 def test_apply_crossover_milk_limit_blank(self):
     with self.assertRaises(ValueError):
         apply_crossover(1, cand_pop, 0, 1, cand_pop)
예제 #5
0
 def test_apply_crossover_crossover_qt_neg(self):
     with self.assertRaises(ValueError):
         apply_crossover(-1, cand_pop, 1, 1, prod_list_full)