Mercurial > repos > yufei-luo > s_mart
diff commons/pyRepetUnit/fastaTranslation/allFrames/tests/Test_F_TranslateInAllFramesAndReplaceStopByX.py @ 18:94ab73e8a190
Uploaded
author | m-zytnicki |
---|---|
date | Mon, 29 Apr 2013 03:20:15 -0400 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/commons/pyRepetUnit/fastaTranslation/allFrames/tests/Test_F_TranslateInAllFramesAndReplaceStopByX.py Mon Apr 29 03:20:15 2013 -0400 @@ -0,0 +1,24 @@ +import os +import unittest +from commons.pyRepetUnit.fastaTranslation.allFrames.TranslateInAllFramesAndReplaceStopByX import TranslateInAllFramesAndReplaceStopByX +from commons.core.seq.Bioseq import Bioseq +from commons.core.utils.FileUtils import FileUtils + +class Test_F_TranslateInAllFramesAndReplaceStopByX(unittest.TestCase): + + def setUp(self): + self.bioseq = Bioseq() + self.preProcess = TranslateInAllFramesAndReplaceStopByX() + self._inputFile = "./datas/test_input_nt.fa" + self._outputFile = "./datas/PreProcessResult.fa" + + + def testAcceptanceTranslateAfastaFileInAllFrame(self): + self.preProcess.setInputFile(self._inputFile) + self.preProcess.setOutputFile(self._outputFile) + self.preProcess.run() + self.assertTrue(FileUtils.are2FilesIdentical(self._outputFile, "./datas/test_input_aa.fa")) + os.system("rm " + self._outputFile) + +if __name__ == "__main__": + unittest.main() \ No newline at end of file