Mercurial > repos > yufei-luo > s_mart
view commons/launcher/tests/Test_RepeatMaskerClusterLauncher.py @ 18:94ab73e8a190
Uploaded
author | m-zytnicki |
---|---|
date | Mon, 29 Apr 2013 03:20:15 -0400 |
parents | |
children |
line wrap: on
line source
import unittest from commons.launcher.RepeatMaskerClusterLauncher import RepeatMaskerClusterLauncher class Test_RepeatmaskerClusterLauncher( unittest.TestCase ): def setUp( self ): self._i = RepeatMaskerClusterLauncher() def tearDown( self ): self._i = None def test_getSpecificHelpAsString( self ): exp = "" exp += "\nspecific options:" exp += "\n -s: name of the subject file (repeats, format='fasta')" exp += "\n -n: nb of processors to use in parallel (default=1)" exp += "\n -g: calculate the GC content" exp += "\n -b: skip bacterial insertion element check" exp += "\n -l: mask low-complexity DNA or simple repeats" obs = self._i.getSpecificHelpAsString() self.assertEqual( exp, obs ) def test_setASpecificAttributeFromCmdLine( self ): self._i.setASpecificAttributeFromCmdLine( "-s", "dummySubjectFile.fa" ) self.assertEqual( "dummySubjectFile.fa", self._i.getSubjectFile() ) self._i.setASpecificAttributeFromCmdLine( "-n", "2" ) self.assertEqual( 2, self._i.getNbProcessors() ) self._i.setASpecificAttributeFromCmdLine( "-g" ) self.assertTrue( self._i.getCalculateGCcontent() ) self._i.setASpecificAttributeFromCmdLine( "-b" ) self.assertTrue( self._i.getSkipBacterialIsCheck() ) self._i.setASpecificAttributeFromCmdLine( "-l" ) self.assertFalse( self._i.getMaskSsr() ) if __name__ == "__main__": unittest.main()