comparison commons/pyRepetUnit/align/hmmOutputParsing/tests/Test_F_HmmscanOutput2align.py @ 31:0ab839023fe4

Uploaded
author m-zytnicki
date Tue, 30 Apr 2013 14:33:21 -0400
parents 94ab73e8a190
children
comparison
equal deleted inserted replaced
30:5677346472b5 31:0ab839023fe4
1 import os
2 import unittest
3 from commons.pyRepetUnit.align.hmmOutputParsing.HmmscanOutput2align import HmmscanOutput2align
4 from commons.core.utils.FileUtils import FileUtils
5
6 CURRENT_DIR = os.getcwd()
7
8 class Test_F_HmmscanOutput2align(unittest.TestCase):
9
10 def setUp(self):
11 self.hmmscanOutput2align = HmmscanOutput2align()
12 self._inputFile = os.environ["REPET_PATH"] + "/commons/pyRepetUnit/hmmer/hmmOutput/tests/datas/hmmscanOutput"
13 self._outputFile = "./datas/test_hmmscanOutput.align"
14 os.chdir(CURRENT_DIR)
15
16 def testParseHmmscanOutput2align(self):
17 self.hmmscanOutput2align.setInputFile(self._inputFile)
18 self.hmmscanOutput2align.setOutputFile(self._outputFile)
19 self.hmmscanOutput2align.run()
20 expectedFile = os.environ["REPET_PATH"] + "/commons/pyRepetUnit/hmmer/hmmOutput/tests/datas/hmmscanOutput.align"
21 self.assertTrue(FileUtils.isRessourceExists(self._outputFile))
22 self.assertTrue(FileUtils.are2FilesIdentical(expectedFile, self._outputFile))
23 os.remove( self._outputFile )
24
25
26 if __name__ == "__main__":
27 unittest.main()