Ejemplo n.º 1
0
 def test_samtools_executes_and_has_version_returns_true(
         self, mpopen, msys):
     mpopen.return_value.communicate.return_value = ('Version: 0.1.19+', '')
     r = subsamplebam.samtools_is_available()
     self.assertTrue(r)
Ejemplo n.º 2
0
 def test_samtools_returns_incorrect_string_returns_false(
         self, mpopen, msys):
     mpopen.return_value.communicate.return_value = ('stdout', '')
     r = subsamplebam.samtools_is_available()
     self.assertFalse(r)
Ejemplo n.º 3
0
 def test_missing_samtools_executable_returns_false(self, mpopen, msys):
     mpopen.side_effect = OSError('samtools missing')
     r = subsamplebam.samtools_is_available()
     self.assertFalse(r)
Ejemplo n.º 4
0
 def test_samtools_executes_and_has_version_returns_true(self, mpopen, msys):
     mpopen.return_value.communicate.return_value = ('Version: 0.1.19+','')
     r = subsamplebam.samtools_is_available()
     self.assertTrue(r)
Ejemplo n.º 5
0
 def test_samtools_returns_incorrect_string_returns_false(self, mpopen, msys):
     mpopen.return_value.communicate.return_value = ('stdout','')
     r = subsamplebam.samtools_is_available()
     self.assertFalse(r)
Ejemplo n.º 6
0
 def test_missing_samtools_executable_returns_false(self, mpopen, msys):
     mpopen.side_effect = OSError('samtools missing')
     r = subsamplebam.samtools_is_available()
     self.assertFalse(r)