18
|
1 import unittest
|
|
2 import os
|
|
3 from commons.core.utils.FileUtils import FileUtils
|
|
4
|
|
5 class Test_F_TranslateAfastaFileInAllFrameAndReplaceStopsByX(unittest.TestCase):
|
|
6
|
|
7 def setUp(self):
|
|
8 self._inputFile = "./datas/ConsensusTestFile_nt.fsa"
|
|
9 self._outputFile = "./datas/PreprocessOuputFile"
|
|
10 self._prg = "translateAfastaFileInAllFrameAndReplaceStopsByX_script.py"
|
|
11
|
|
12
|
|
13 def testAcceptanceTranslateAfastaFileInAllFrameAndReplaceStopsByX_script(self):
|
|
14 cmd = self._prg
|
|
15 cmd += " -i %s" % ( self._inputFile )
|
|
16 cmd += " -o %s" % ( self._outputFile )
|
|
17 os.system( cmd )
|
|
18 self.assertTrue(FileUtils.are2FilesIdentical( self._outputFile, "./datas/ConsensusTestFile_aaWithoutStop.fsa"))
|
|
19 os.system( "rm " + self._outputFile )
|
|
20
|
|
21
|
|
22 if __name__ == "__main__":
|
|
23 unittest.main() |