本文整理汇总了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
示例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