18
|
1 import os
|
|
2 import unittest
|
|
3 from commons.pyRepetUnit.fastaTranslation.allFrames.TranslateInAllFramesAndReplaceStopByX import TranslateInAllFramesAndReplaceStopByX
|
|
4 from commons.core.seq.Bioseq import Bioseq
|
|
5 from commons.core.utils.FileUtils import FileUtils
|
|
6
|
|
7 class Test_F_TranslateInAllFramesAndReplaceStopByX(unittest.TestCase):
|
|
8
|
|
9 def setUp(self):
|
|
10 self.bioseq = Bioseq()
|
|
11 self.preProcess = TranslateInAllFramesAndReplaceStopByX()
|
|
12 self._inputFile = "./datas/test_input_nt.fa"
|
|
13 self._outputFile = "./datas/PreProcessResult.fa"
|
|
14
|
|
15
|
|
16 def testAcceptanceTranslateAfastaFileInAllFrame(self):
|
|
17 self.preProcess.setInputFile(self._inputFile)
|
|
18 self.preProcess.setOutputFile(self._outputFile)
|
|
19 self.preProcess.run()
|
|
20 self.assertTrue(FileUtils.are2FilesIdentical(self._outputFile, "./datas/test_input_aa.fa"))
|
|
21 os.system("rm " + self._outputFile)
|
|
22
|
|
23 if __name__ == "__main__":
|
|
24 unittest.main() |