comparison commons/launcher/tests/Test_F_LaunchLastZ.py @ 18:94ab73e8a190

Uploaded
author m-zytnicki
date Mon, 29 Apr 2013 03:20:15 -0400
parents
children
comparison
equal deleted inserted replaced
17:b0e8584489e6 18:94ab73e8a190
1 import unittest
2 import os
3 from commons.core.utils.FileUtils import FileUtils
4 from commons.launcher.LaunchLastZ import LaunchLastZ
5
6 class Test_F_LaunchLastZ(unittest.TestCase):
7
8 def setUp(self):
9 self._inFastaFileName = "%s/Tools/input_TestFLastZ.fa" % os.environ["REPET_DATA"]
10 self._expAxtFileName = "%s/Tools/exp_TestFLastZ.axt" % os.environ["REPET_DATA"]
11 self._obsAxtFileName = "obsLastZ.axt"
12
13 def tearDown(self):
14 try:
15 os.remove(self._obsAxtFileName)
16 except:pass
17
18 def test_run(self):
19 ilauncher = LaunchLastZ(self._inFastaFileName, self._inFastaFileName, self._obsAxtFileName,verbosity=1)
20 ilauncher.run()
21 self.assertTrue(FileUtils.are2FilesIdentical(self._expAxtFileName, self._obsAxtFileName))
22
23 def test_run_as_script(self):
24 #FIXME : change path
25 cmd = 'python %s/commons/launcher/LaunchLastZ.py -q %s -r %s -o %s' % (os.environ["REPET_PATH"], self._inFastaFileName, self._inFastaFileName, self._obsAxtFileName)
26 os.system(cmd)
27 self.assertTrue(FileUtils.are2FilesIdentical(self._expAxtFileName, self._obsAxtFileName))
28
29
30 if __name__ == "__main__":
31 unittest.main()