Skip to content

Commit

Permalink
[py2py3] JobSubmitter_t.py - fix pickle path - test
Browse files Browse the repository at this point in the history
  • Loading branch information
mapellidario committed Jun 21, 2021
1 parent 6ca003d commit 60f6cae
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion test/python/WMComponent_t/JobSubmitter_t/JobSubmitter_t.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ def createTestWorkload(self, name='workloadTest'):
Creates a test workload for us to run on, hold the basic necessities.
"""

workload = testWorkload()
workload = testWorkload(name=name)

taskMaker = TaskMaker(workload, os.path.join(self.testDir, name))
taskMaker.skipSubscription = True
Expand Down
12 changes: 6 additions & 6 deletions test/python/WMCore_t/WMSpec_t/TestSpec.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ class TestWorkloadFactory(object):
Stamp out test workfloads.
"""
def createWorkload(self):
def createWorkload(self, name="TestWorkload"):
"""
_createWorkload_
Create a new workload.
"""
workload = newWorkload("TestWorkload")
workload = newWorkload(name)
workload.setOwner("[email protected]")
workload.setStartPolicy("DatasetBlock", SliceType = "NumberOfFiles", SliceSize = 1)
workload.setEndPolicy("SingleShot")
Expand Down Expand Up @@ -119,15 +119,15 @@ def addOutputModule(self, parentTask, outputModuleName, dataTier, filterName):
mergedLFNBase = "/store/temp/WMAgent/merged")
return

def __call__(self, emulation = False):
def __call__(self, name="TestWorkload", emulation=False):
"""
_call_
Create a test workload.
"""
self.emulation = emulation

workload = self.createWorkload()
workload = self.createWorkload(name)
procTask = workload.newTask("ReReco")

self.setupProcessingTask(procTask)
Expand All @@ -136,14 +136,14 @@ def __call__(self, emulation = False):
self.addOutputModule(procTask, "TestOutputModule", "RECO", "SomeFilter")
return workload

def testWorkload(emulation = False):
def testWorkload(name="TestWorkload", emulation=False):
"""
_testWorkflow_
Instantiate the TestWorkloadFactory and create a workload.
"""
myTestWorkloadFactory = TestWorkloadFactory()
return myTestWorkloadFactory(emulation = emulation)
return myTestWorkloadFactory(name=name, emulation=emulation)

if __name__ == "__main__":
testWorkload()

0 comments on commit 60f6cae

Please sign in to comment.