def test_parse_cigar_string_detects_bad_inputs(self, bad_cigar_str): with self.assertRaises(ValueError): cigar.parse_cigar_string(bad_cigar_str)
def test_parse_cigar_string_single(self, cigar_str, expected): self.assertEqual(cigar.parse_cigar_string(cigar_str), expected)
def test_parse_cigar_string_three_pieces(self, cigar_str, expected): self.assertEqual(cigar.parse_cigar_string(cigar_str), expected)
def test_alignment_length(self, cigar_str, expected): cigar_units = cigar.parse_cigar_string(cigar_str) self.assertEqual(cigar.alignment_length(cigar_units), expected)