import unittest
import os
from SMART.Java.Python.misc import Utils

class Test_F_mappingToCoordinates(unittest.TestCase):


    def setUp(self):
        self._inputFileName = 'inputMTC.sam'
        self._outputFileName = 'outputGff.gff3'
        self._expOutputFileName = '../TestFiles/expOutputGff.gff3'
        
    def tearDown(self):
        os.remove(self._outputFileName)

    def test_run_default_option(self):
        cmd = 'python ../mappingToCoordinates.py -i ../TestFiles/%s -f sam -o %s -v 0' % (self._inputFileName, self._outputFileName)
        os.system(cmd)
        self.assertTrue(Utils.diff(self._outputFileName, self._expOutputFileName))
        
if __name__ == "__main__":
    unittest.main()
