def testNoFilesSpecifiedNoOverlap(self): from Ganga.GPI import LocalFile, Job j1 = Job(outputfiles=[LocalFile('foo.root'), LocalFile('bar.root'), LocalFile('out.log')]) j2 = Job(outputfiles=[LocalFile('a.root'), LocalFile('b.root'), LocalFile('c.log')]) assert findFilesToMerge([j1, j2]) == [], 'Should merge no files'
def testNoFilesSpecifiedSomeOverlap(self): j1 = Job( outputfiles=[LocalFile('foo.root'), LocalFile('bar.root'), LocalFile('out.log')]) j2 = Job( outputfiles=[LocalFile('a.root'), LocalFile('b.root'), LocalFile('out.log')]) assert findFilesToMerge( [j1, j2]) == ['out.log'], 'Should merge only some files'
def testNoFilesSpecifiedAllSame(self): from Ganga.GPI import LocalFile, Job files = [LocalFile('foo.root'), LocalFile( 'bar.root'), LocalFile('out.log')] j1 = Job(outputfiles=files) j2 = Job(outputfiles=files) assert j1.outputfiles == j2.outputfiles, 'File lists should be the same' assert findFilesToMerge([j1, j2]) == ['foo.root', 'bar.root', 'out.log'], 'Should merge all files'
def testNoFilesSpecifiedSomeOverlap(self): j1 = Job(outputfiles=[ LocalFile('foo.root'), LocalFile('bar.root'), LocalFile('out.log') ]) j2 = Job(outputfiles=[ LocalFile('a.root'), LocalFile('b.root'), LocalFile('out.log') ]) assert findFilesToMerge([j1, j2]) == ['out.log' ], 'Should merge only some files'