Пример #1
0
def test_initialize():
    """test_initialize."""
    team = BaseTeam("team")
    w = BaseWorker("w1", team_id=team.ID)
    w.state = BaseWorkerState.WORKING
    w.cost_list = [9.0, 7.2]
    w.assigned_task_list = [BaseTask("task")]
    w.initialize()
    assert w.state == BaseWorkerState.FREE
    assert w.cost_list == []
    assert w.assigned_task_list == []
Пример #2
0
def test_initialize():
    team = BaseTeam("team")
    w = BaseWorker("w1", team_id=team.ID)
    w.state = BaseResourceState.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 == BaseResourceState.FREE
    assert w.cost_list == []
    assert w.start_time_list == []
    assert w.finish_time_list == []
    assert w.assigned_task_list == []