本文整理汇总了Python中job.Job.status_history方法的典型用法代码示例。如果您正苦于以下问题:Python Job.status_history方法的具体用法?Python Job.status_history怎么用?Python Job.status_history使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类job.Job
的用法示例。
在下文中一共展示了Job.status_history方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_empty_history
# 需要导入模块: from job import Job [as 别名]
# 或者: from job.Job import status_history [as 别名]
def test_empty_history(self):
job = Job('test')
job.status = Status.WAIT
job.status = Status.RUN
job.status_history = []
# An empty history should not happen, but if it did, the value
# should be Status.INIT.
assert job.status == Status.INIT, 'status should be Status.INIT'
示例2: test_empty_history
# 需要导入模块: from job import Job [as 别名]
# 或者: from job.Job import status_history [as 别名]
def test_empty_history(self):
job = Job(name='testsuite-job', username='digits-testsuite')
job.status = Status.WAIT
job.status = Status.RUN
job.status_history = []
# An empty history should not happen, but if it did, the value
# should be Status.INIT.
assert job.status == Status.INIT, 'status should be Status.INIT'