Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update unittesting
Browse files Browse the repository at this point in the history
Shawnsdaddy committed Dec 13, 2024
1 parent 29ad47a commit 8302e55
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions arknights_mower/tests/scheduler_task_tests.py
Original file line number Diff line number Diff line change
@@ -380,7 +380,8 @@ def test_reorder_1(self):
op_data.operators["凯尔希"].current_room = "dormitory_2"
op_data.operators["凯尔希"].current_index = 2
op_data.dorm[2].name = "夕"
try_reorder(op_data.plan, None, op_data, tasks)
plan = try_reorder(op_data)
self.assertEqual(len(plan), 2)

def test_reorder_2(self):
# 非高优高效不会被移动
@@ -391,7 +392,10 @@ def test_reorder_2(self):
op_data.dorm[2].name = "夕"
op_data.dorm[3].name = "见行者"
op_data.dorm[4].name = "森蚺"
try_reorder(op_data.plan, None, op_data, tasks)
plan = try_reorder(op_data)
self.assertEqual(len(plan), 3)
self.assertEqual(plan["dormitory_1"][2], "夕")
self.assertEqual(plan["dormitory_1"][4], "凯尔希")

def test_reorder_3(self):
# 如果高优都占了,则不动
@@ -404,7 +408,10 @@ def test_reorder_3(self):
op_data.operators["见行者"].current_room = "dormitory_2"
op_data.operators["见行者"].current_index = 2
op_data.dorm[4].name = "见行者"
try_reorder(op_data.plan, None, op_data, tasks)
try_reorder(op_data)
plan = try_reorder(op_data)
self.assertEqual(plan["dormitory_1"][2], "夕")
self.assertEqual(plan["dormitory_1"][3], "见行者")

def init_opdata(self):
agent_base_config = PlanConfig(

0 comments on commit 8302e55

Please sign in to comment.