def test_getBagSubDirectory(self): self.assertEqual(getBagSubDirectory(""), "/" + BAGSUBDIRECTORY) self.assertEqual(getBagSubDirectory("blah"), "/blah/" + BAGSUBDIRECTORY) self.assertEqual(getDefaultBagFile("blah"), "/blah/" + USBCAMTMPFILE.replace(".", "")) self.assertEqual( getDefaultBagFile(getBagSubDirectory("blah")), "/blah/" + BAGSUBDIRECTORY + "/" + USBCAMTMPFILE.replace(".", ""), )
def exportBagData(filename,runName): """ Exports the bag file from the sofiehdfformat file. """ logging.debug(runName) totalRun = getDefaultBagFile(getBagSubDirectory(runName)) logging.debug(totalRun) outFileName = filename+'_'+getDefaultBagFileName() exportFile(filename,totalRun,outFileName) return outFileName