def test_7(self): testArgs = [ 'None', '-F', self.fasta, '-k', '2', '-w', '10', '-s', '10', '-M', 'max' ] answer1 = \ '''test1 0 10 2 test1 10 18 2 test2 0 10 2 test2 10 13 1 ''' with patch('sys.argv', testArgs): with patch('sys.stdout', StringIO()): komplexity.main() self.assertMultiLineEqual(answer1, sys.stdout.getvalue())
def test_2(self): testArgs = ['None', '-F', self.fasta, '-k', '3', '-w', '6', '-s', '5'] answer1 = \ '''test1 0 5 4 test1 5 10 4 test1 10 15 4 test1 15 18 2.50 test2 0 5 4 test2 5 10 4 test2 10 13 2.50 ''' with patch('sys.argv', testArgs): with patch('sys.stdout', StringIO()): komplexity.main() self.assertMultiLineEqual(answer1, sys.stdout.getvalue())
def test_6(self): testArgs = [ 'None', '-F', self.fasta, '-k', '3', '-w', '6', '-s', '5', '-A', 'sum', '-M', 'duplicate' ] answer1 = \ '''test1 0 5 0 test1 5 10 0 test1 10 15 0 test1 15 18 0 test2 0 5 0 test2 5 10 0 test2 10 13 0 ''' with patch('sys.argv', testArgs): with patch('sys.stdout', StringIO()): komplexity.main() self.assertMultiLineEqual(answer1, sys.stdout.getvalue())