Skip to content

Commit

Permalink
#285 单元测试更新
Browse files Browse the repository at this point in the history
  • Loading branch information
Shawnsdaddy committed Dec 22, 2023
1 parent 453c2d3 commit 47b2176
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions arknights_mower/tests/scheduler_task_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ def test_check_dorm_ordering_add_plan_1(self):
self.assertEqual(1, len(tasks[0].plan))
# 老plan含有见行者
self.assertEqual("见行者", tasks[1].plan["dormitory_1"][3])
del tasks[0]
# 重复执行不会生成新的
check_dorm_ordering(tasks, op_data)
self.assertEqual(1, len(tasks))

def test_check_dorm_ordering_add_plan_2(self):
# 测试 方程有效
Expand All @@ -111,6 +115,12 @@ def test_check_dorm_ordering_add_plan_2(self):
self.assertEqual(1, len(tasks[0].plan))
# 老plan不变
self.assertEqual("Current", tasks[1].plan["dormitory_1"][3])
del tasks[0]
# 重复执行不会生成新的
check_dorm_ordering(tasks, op_data)
self.assertEqual(1, len(tasks))



def test_check_dorm_ordering_not_plan(self):
# 测试 方程有效
Expand All @@ -127,6 +137,9 @@ def test_check_dorm_ordering_not_plan(self):

# 如果VIP位已经被占用,则不会生成新任务
self.assertEqual(1, len(tasks))
# 重复执行不会生成新的
check_dorm_ordering(tasks, op_data)
self.assertEqual(1, len(tasks))


def init_opdata(self):
Expand Down

0 comments on commit 47b2176

Please sign in to comment.