def test_number_of_sections_simple(self, mock_find_next_glyph_index): # rare one-string guitar :-) mock_find_next_glyph_index.side_effect = [5, 13, 20, 27, None] block = ['E|---3---|---2---|--5--|---4--|'] self.assertEqual(parse.number_of_sections(block), 4)
def test_number_of_sections_zero(self, mock_find_next_glyph_index): mock_find_next_glyph_index.return_value = None block = ['E|-----|'] self.assertEqual(parse.number_of_sections(block), 0)
def test_number_of_sections_multi_string(self, mock_find_next_glyph_index): mock_find_next_glyph_index.side_effect = [3, 7, 14, 18, None] block = ['A|-9---10---|-9---12---|', 'E|-----10---|-----12---|'] self.assertEqual(parse.number_of_sections(block), 4)