Esempio n. 1
0
 def test_stop_search_hour_limit_neg(self):
     with self.assertRaises(ValueError):
         stop_search(-1, 1, 1, 1, cand_pop, best_fit_array_full,
                     medium_fit_array_full, 1, prod_list_full)
Esempio n. 2
0
 def test_stop_search_hour_tolerance_blank(self):
     with self.assertRaises(ValueError):
         stop_search(1, 0, 1, 1, cand_pop, best_fit_array_full,
                     medium_fit_array_full, 1, prod_list_full)
Esempio n. 3
0
 def test_stop_search_ok(self):
     result = stop_search(1, 1, 1, 1, cand_pop, best_fit_array_full,
                          medium_fit_array_full, 1, prod_list_full)
     self.assertNotEqual(result, "ok")
Esempio n. 4
0
 def test_stop_search_vet_products_list_blank(self):
     with self.assertRaises(ValueError):
         stop_search(1, 1, 1, 1, cand_pop, best_fit_array_full,
                     medium_fit_array_full, 1, None)
Esempio n. 5
0
 def test_stop_search_vet_generation_neg(self):
     with self.assertRaises(ValueError):
         stop_search(1, 1, 1, 1, cand_pop, best_fit_array_full,
                     medium_fit_array_full, -1, prod_list_full)
Esempio n. 6
0
 def test_stop_search_medium_fit_array_blank(self):
     with self.assertRaises(ValueError):
         stop_search(1, 1, 1, 1, pop_full, best_fit_array_full, None, 1,
                     prod_list_full)
Esempio n. 7
0
 def test_stop_search_milk_tolerance_neg(self):
     with self.assertRaises(ValueError):
         stop_search(1, 1, 1, -1, cand_pop, best_fit_array_full,
                     medium_fit_array_full, 1, prod_list_full)