def test_initialize(): """test_initialize.""" team = BaseWorkplace("team") w = BaseFacility("w1", workplace_id=team.ID) w.state = BaseFacilityState.WORKING w.cost_list = [9.0, 7.2] w.assigned_task_list = [BaseTask("task")] w.initialize() assert w.state == BaseFacilityState.FREE assert w.cost_list == [] assert w.assigned_task_list == []
def test_initialize(): team = BaseFactory("team") w = BaseFacility("w1", factory_id=team.ID) w.state = BaseFacilityState.WORKING w.cost_list = [9.0, 7.2] w.start_time_list = [0] w.finish_time_list = [1] w.assigned_task_list = [BaseTask("task")] w.initialize() assert w.state == BaseFacilityState.FREE assert w.cost_list == [] assert w.start_time_list == [] assert w.finish_time_list == [] assert w.assigned_task_list == []