当前位置: 首页>>代码示例>>Python>>正文


Python RecipeDefinition.get_job_type_map方法代码示例

本文整理汇总了Python中recipe.configuration.definition.recipe_definition.RecipeDefinition.get_job_type_map方法的典型用法代码示例。如果您正苦于以下问题:Python RecipeDefinition.get_job_type_map方法的具体用法?Python RecipeDefinition.get_job_type_map怎么用?Python RecipeDefinition.get_job_type_map使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在recipe.configuration.definition.recipe_definition.RecipeDefinition的用法示例。


在下文中一共展示了RecipeDefinition.get_job_type_map方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_successful_new_recipe

# 需要导入模块: from recipe.configuration.definition.recipe_definition import RecipeDefinition [as 别名]
# 或者: from recipe.configuration.definition.recipe_definition.RecipeDefinition import get_job_type_map [as 别名]
    def test_successful_new_recipe(self):
        """Tests calling RecipeDefinition.get_job_type_map() successfully."""

        definition = {
            'version': '1.0',
            'input_data': [{
                'name': 'Recipe Input',
                'type': 'file',
                'media_types': ['text/plain'],
            }],
            'jobs': [{
                'name': 'Job 1',
                'job_type': {
                    'name': self.job_type1.name,
                    'version': self.job_type1.version,
                },
                'recipe_inputs': [{
                    'recipe_input': 'Recipe Input',
                    'job_input': 'Input 1',
                }]
            }, {
                'name': 'Job 2',
                'job_type': {
                    'name': self.job_type2.name,
                    'version': self.job_type2.version,
                },
                'dependencies': [{
                    'name': 'Job 1',
                    'connections': [{
                        'output': 'Output 1',
                        'input': 'Input 2',
                    }]
                }]
            }]
        }
        recipe_definition = RecipeDefinition(definition)

        results = recipe_definition.get_job_type_map()
        self.assertDictEqual(results, {'Job 1': self.job_type1, 'Job 2': self.job_type2})
开发者ID:AppliedIS,项目名称:scale,代码行数:41,代码来源:test_recipe_definition.py


注:本文中的recipe.configuration.definition.recipe_definition.RecipeDefinition.get_job_type_map方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。