示例#1
0
    def test_changing_working_dir(self):
        """Mafft BaseCommand should change according to WorkingDir"""
        c = Mafft(WorkingDir='/tmp/mafft_test')
        self.assertEqual(c.BaseCommand,\
            ''.join(['cd "','/tmp/mafft_test','/"; ','mafft']))
        c = Mafft()
        c.WorkingDir = '/tmp/mafft_test2'
        self.assertEqual(c.BaseCommand,\
            ''.join(['cd "','/tmp/mafft_test2','/"; ','mafft']))

        #removing the dirs is proof that they were created at the same time
        #if the dirs are not there, an OSError will be raised
        rmdir('/tmp/mafft_test')
        rmdir('/tmp/mafft_test2')
示例#2
0
 def test_changing_working_dir(self):
     """Mafft BaseCommand should change according to WorkingDir"""
     c = Mafft(WorkingDir='/tmp/mafft_test')
     self.assertEqual(c.BaseCommand,\
         ''.join(['cd "','/tmp/mafft_test','/"; ','mafft']))
     c = Mafft()
     c.WorkingDir = '/tmp/mafft_test2'
     self.assertEqual(c.BaseCommand,\
         ''.join(['cd "','/tmp/mafft_test2','/"; ','mafft']))
     
     #removing the dirs is proof that they were created at the same time
     #if the dirs are not there, an OSError will be raised
     rmdir('/tmp/mafft_test')
     rmdir('/tmp/mafft_test2')
示例#3
0
 def test_base_command(self):
     """Mafft BaseCommand should return the correct BaseCommand"""
     c = Mafft()
     self.assertEqual(c.BaseCommand,\
         ''.join(['cd "',getcwd(),'/"; ','mafft']))
     c.Parameters['--quiet'].on()
     self.assertEqual(c.BaseCommand,\
         ''.join(['cd "',getcwd(),'/"; ','mafft --quiet']))
     c.Parameters['--globalpair'].on()
     self.assertEqual(c.BaseCommand,\
         ''.join(['cd "',getcwd(),'/"; ','mafft --globalpair --quiet']))
     c.Parameters['--maxiterate'].on(1000)
     self.assertEqual(c.BaseCommand,\
         ''.join(['cd "',getcwd(),'/"; ',"""mafft --maxiterate 1000 --globalpair --quiet"""]))