diff commons/launcher/tests/Test_F_LaunchLastZ.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/launcher/tests/Test_F_LaunchLastZ.py	Mon Apr 29 03:20:15 2013 -0400
@@ -0,0 +1,31 @@
+import unittest
+import os
+from commons.core.utils.FileUtils import FileUtils
+from commons.launcher.LaunchLastZ import LaunchLastZ
+
+class Test_F_LaunchLastZ(unittest.TestCase):
+    
+    def setUp(self):
+        self._inFastaFileName = "%s/Tools/input_TestFLastZ.fa" % os.environ["REPET_DATA"]
+        self._expAxtFileName  = "%s/Tools/exp_TestFLastZ.axt" % os.environ["REPET_DATA"] 
+        self._obsAxtFileName = "obsLastZ.axt"
+        
+    def tearDown(self):
+        try:
+            os.remove(self._obsAxtFileName)
+        except:pass
+        
+    def test_run(self):
+        ilauncher = LaunchLastZ(self._inFastaFileName, self._inFastaFileName, self._obsAxtFileName,verbosity=1)
+        ilauncher.run()
+        self.assertTrue(FileUtils.are2FilesIdentical(self._expAxtFileName, self._obsAxtFileName))
+        
+    def test_run_as_script(self):
+        #FIXME : change path 
+        cmd = 'python %s/commons/launcher/LaunchLastZ.py -q %s -r %s -o %s' % (os.environ["REPET_PATH"], self._inFastaFileName, self._inFastaFileName, self._obsAxtFileName)
+        os.system(cmd)
+        self.assertTrue(FileUtils.are2FilesIdentical(self._expAxtFileName, self._obsAxtFileName))
+ 
+                       
+if __name__ == "__main__":
+    unittest.main()
\ No newline at end of file