本文整理汇总了Python中pinball.ui.data_builder.DataBuilder._workflow_data_from_instances_data方法的典型用法代码示例。如果您正苦于以下问题:Python DataBuilder._workflow_data_from_instances_data方法的具体用法?Python DataBuilder._workflow_data_from_instances_data怎么用?Python DataBuilder._workflow_data_from_instances_data使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pinball.ui.data_builder.DataBuilder
的用法示例。
在下文中一共展示了DataBuilder._workflow_data_from_instances_data方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_workflow_data_from_instances_data4
# 需要导入模块: from pinball.ui.data_builder import DataBuilder [as 别名]
# 或者: from pinball.ui.data_builder.DataBuilder import _workflow_data_from_instances_data [as 别名]
def test_workflow_data_from_instances_data4(self):
wf_instance_list = [
WorkflowInstanceData('wf', '22346', Status.ABORTED, 12345, 12392),
WorkflowInstanceData('wf', '22347', Status.SUCCESS, 12346, 12393),
WorkflowInstanceData('wf', '22345', Status.FAILURE, 12391, sys.maxint),
]
wf_data = DataBuilder._workflow_data_from_instances_data(
wf_instance_list)
self.assertEquals(wf_data.workflow, 'wf')
self.assertEquals(wf_data.status, Status.SUCCESS)
self.assertEquals(wf_data.last_instance, '22347')
self.assertEquals(wf_data.last_start_time, 12346)
self.assertEquals(wf_data.last_end_time, 12393)
self.assertEquals(wf_data.running_instance_number, 0)
示例2: test_workflow_data_from_instances_data2
# 需要导入模块: from pinball.ui.data_builder import DataBuilder [as 别名]
# 或者: from pinball.ui.data_builder.DataBuilder import _workflow_data_from_instances_data [as 别名]
def test_workflow_data_from_instances_data2(self):
wf_instance_list = [
WorkflowInstanceData('wf', '22346', Status.ABORTED, 12355, sys.maxint),
WorkflowInstanceData('wf', '22347', Status.SUCCESS, 12365, 12390),
WorkflowInstanceData('wf', '22345', Status.RUNNING, 12345, None),
]
wf_data = DataBuilder._workflow_data_from_instances_data(
wf_instance_list)
self.assertEquals(wf_data.workflow, 'wf')
self.assertEquals(wf_data.status, Status.RUNNING)
self.assertEquals(wf_data.last_instance, '22345')
self.assertEquals(wf_data.last_start_time, 12345)
self.assertEquals(wf_data.last_end_time, None)
self.assertEquals(wf_data.running_instance_number, 1)