def test_setInOutFiles(self): """Test PBAlignFiles.SetInOutFiles().""" p = PBAlignFiles() self.assertIsNone(p.inputFileName) self.assertIsNone(p.outputFileName) self.assertIsNone(p.referencePath) p.SetInOutFiles(self.inputFileName, self.referenceFile, self.outputFileName, None) self.assertTrue(filecmp.cmp(p.inputFileName, self.inputFileName)) self.assertTrue(filecmp.cmp(p.referencePath, self.referenceFile)) self.assertTrue(filecmp.cmp(p.targetFileName, self.referenceFile)) self.assertTrue(filecmp.cmp(p.outputFileName, self.outputFileName)) self.assertIsNone(p.regionTable)
class Test_ForQuiverService(unittest.TestCase): """Test pbalign.forquiverservice.forquiver.""" def setUp(self): self.inCmpFile = path.join(DATA_DIR, "testforquiver.cmp.h5") self.outCmpFile = mkstemp(suffix=".cmp.h5")[1] copyfile(self.inCmpFile, self.outCmpFile) self.basFile = path.join(DATA_DIR, "lambda_bax.fofn") refpath = "/pbi/dept/secondary/siv/references/lambda/" self.fileNames = PBAlignFiles() self.fileNames.SetInOutFiles(self.basFile, refpath, self.outCmpFile, None, None) self.options = Opt() self.obj = ForQuiverService(self.fileNames, self.options) def tearDown(self): remove(self.outCmpFile) def test_run(self): """Test ForQuiverService.__init__().""" self.obj.run()