本文整理汇总了Python中recipe.configuration.definition.recipe_definition.RecipeDefinition.get_unqueued_job_statuses方法的典型用法代码示例。如果您正苦于以下问题:Python RecipeDefinition.get_unqueued_job_statuses方法的具体用法?Python RecipeDefinition.get_unqueued_job_statuses怎么用?Python RecipeDefinition.get_unqueued_job_statuses使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类recipe.configuration.definition.recipe_definition.RecipeDefinition
的用法示例。
在下文中一共展示了RecipeDefinition.get_unqueued_job_statuses方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_successful
# 需要导入模块: from recipe.configuration.definition.recipe_definition import RecipeDefinition [as 别名]
# 或者: from recipe.configuration.definition.recipe_definition.RecipeDefinition import get_unqueued_job_statuses [as 别名]
def test_successful(self):
'''Tests calling RecipeDefinition.get_unqueued_job_statuses() successfully.'''
recipe_definition = RecipeDefinition(self.definition)
recipe_definition.validate_job_interfaces()
recipe_jobs = {
'job_failed': self.job_failed,
'job_completed': self.job_completed,
'job_running': self.job_running,
'job_queued': self.job_queued,
'job_canceled': self.job_canceled,
'job_fa_co_a': self.job_fa_co_a,
'job_fa_co_b': self.job_fa_co_b,
'job_co_ru_qu_a': self.job_co_ru_qu_a,
'job_co_ru_qu_b': self.job_co_ru_qu_b,
'job_qu_ca_a': self.job_qu_ca_a,
'job_qu_ca_b': self.job_qu_ca_b,
}
results = recipe_definition.get_unqueued_job_statuses(recipe_jobs)
expected_results = {
self.job_fa_co_a.id: 'BLOCKED',
self.job_fa_co_b.id: 'BLOCKED',
self.job_co_ru_qu_a.id: 'PENDING',
self.job_co_ru_qu_b.id: 'PENDING',
self.job_qu_ca_a.id: 'BLOCKED',
self.job_qu_ca_b.id: 'BLOCKED',
}
self.assertDictEqual(results, expected_results)