Пример #1
0
 def test_stop_search_ok(self):
     result = stop_search(1, 1, cand_pop, best_fit_array_full,
                          medium_fit_array_full, 1, obj_list_full)
     self.assertNotEqual(result, "ok")
Пример #2
0
 def test_stop_search_vet_obj_list_blank(self):
     with self.assertRaises(ValueError):
         stop_search(1, 1, cand_pop, best_fit_array_full,
                     medium_fit_array_full, 1, None)
Пример #3
0
 def test_stop_search_weight_tolerance_neg(self):
     with self.assertRaises(ValueError):
         stop_search(1, -1, cand_pop, best_fit_array_full,
                     medium_fit_array_full, 1, obj_list_full)
Пример #4
0
 def test_stop_search_vet_generation_neg(self):
     with self.assertRaises(ValueError):
         stop_search(1, 1, cand_pop, best_fit_array_full,
                     medium_fit_array_full, -1, obj_list_full)
Пример #5
0
 def test_stop_search_weight_limit_blank(self):
     with self.assertRaises(ValueError):
         stop_search(0, 1, cand_pop, best_fit_array_full,
                     medium_fit_array_full, 1, obj_list_full)