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


Python RunJob.buildWMBSJob方法代码示例

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


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

示例1: testC_CheckWMBSBuildRoleAndGroup

# 需要导入模块: from WMCore.BossAir.RunJob import RunJob [as 别名]
# 或者: from WMCore.BossAir.RunJob.RunJob import buildWMBSJob [as 别名]
    def testC_CheckWMBSBuildRoleAndGroup(self):
        """
        _CheckWMBSBuild_

        Trivial test that checks whether we can build
        runJobs from WMBS jobs
        """
        jobGroup = []

        # Create jobs
        for id in range(10):
            testJob = Job( name = 'Job_%i' % (id) )
            testJob['owner']    = "mnorman"
            testJob['usergroup'] = "mygroup_%i" % id
            testJob['userrole'] = "myrole_%i" % id
            testJob['location'] = 'Xanadu'
            jobGroup.append(testJob)

        for job in jobGroup:
            rj = RunJob()
            rj.buildFromJob(job = job)
            self.assertEqual(job['usergroup'], rj['usergroup'])
            self.assertEqual(job['userrole'], rj['userrole'])
            job2 = rj.buildWMBSJob()
            self.assertEqual(job['usergroup'], job2['usergroup'])
            self.assertEqual(job['userrole'], job2['userrole'])
        return
开发者ID:AndrewLevin,项目名称:WMCore,代码行数:29,代码来源:RunJob_t.py

示例2: testB_CheckWMBSBuild

# 需要导入模块: from WMCore.BossAir.RunJob import RunJob [as 别名]
# 或者: from WMCore.BossAir.RunJob.RunJob import buildWMBSJob [as 别名]
    def testB_CheckWMBSBuild(self):
        """
        _CheckWMBSBuild_

        Trivial test that checks whether we can build
        runJobs from WMBS jobs
        """

        jobGroup = self.createJobs(nJobs = 10)

        for job in jobGroup.jobs:
            rj = RunJob()
            rj.buildFromJob(job = job)
            self.assertEqual(job['id'], rj['jobid'])
            self.assertEqual(job['retry_count'], rj['retry_count'])
            job2 = rj.buildWMBSJob()
            self.assertEqual(job['id'], job2['id'])
            self.assertEqual(job['retry_count'], job2['retry_count'])


        return
开发者ID:AndrewLevin,项目名称:WMCore,代码行数:23,代码来源:RunJob_t.py


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