def test_add_truck(self): order_probability = 300 var_food_zone = FoodZone(order_probability) price = 3000 making_time = 60 var_truck = FoodTruck(price, making_time) var_food_zone.add_truck(var_truck) self.assertIn(var_truck, var_food_zone.food_trucks)
def test_add_truck(self): order_probability = 300 var_food_zone = FoodZone(order_probability) price = 3000 making_time = 60 var_truck = FoodTruck(price, making_time) var_food_zone.add_truck(var_truck) self.assertIn(var_truck, var_food_zone.food_trucks) # var_truck이 food_truck에 있나
def main(): order_probability = 300 open_seconds = 60*60*6*20*12 food_list = [(2000, 60)] food_zone1 = FoodZone(order_probability) for price, making_time in food_list: food_zone1.add_truck(FoodTruck(price, making_time)) start_simulation(food_zone1, open_seconds) print('----# Food zone 결과(영업 시간: {0:.1f}, 손님 확률: 대략 {1}초당 1명) #----'.format( open_seconds/(60*60), order_probability)) print_food_zone_result(food_zone1, open_seconds)
def test___init__(self): order_probability = 300 var_food_zone = FoodZone(order_probability) self.assertEqual(set(), var_food_zone.food_trucks) self.assertEqual(list(), var_food_zone.order_queue) self.assertEqual(list(), var_food_zone.waiting_times) self.assertEqual(list(), var_food_zone.income) self.assertEqual(order_probability, var_food_zone.order_probability)
def test_is_new_order(self): order_probability = 300 var_food_zone = FoodZone(order_probability) self.assertEqual(True, var_food_zone.is_new_order(order_probability)) self.assertEqual(False, var_food_zone.is_new_order(order_probability - 1))