Esempio n. 1
0
 def test_chords_double_digits_okay(self):
     expected = ({2 : 13, 3 : 13}, 19)
     g = 'G|-----------------13-----------|---------------------------|'
     d = 'D|-----------------13-----------|---------------------------|'
     mod_lines = list(self.lines)
     mod_lines[2] = g
     mod_lines[3] = d
     self.assertEqual(parse.cross_section(5, mod_lines), expected)
Esempio n. 2
0
 def test_empty_track(self):
     block = ['E|---|---|---|',
              'B|---|---|---|',
              'G|---|---|---|',
              'D|---|---|---|',
              'A|---|---|---|',
              'E|---|---|---|']
     expected = (None, None)
     self.assertEqual(parse.cross_section(1, block), expected)
Esempio n. 3
0
 def test_chords_mixed_digits_align_right_okay(self):
     # not relying on consistent alignment in tab corpus...
     expected = ({2 : 9, 3 : 11}, 19)
     g = 'G|------------------9-----------|---------------------------|'
     d = 'D|-----------------11-----------|---------------------------|'
     mod_lines = list(self.lines)
     mod_lines[2] = g
     mod_lines[3] = d
     self.assertEqual(parse.cross_section(5, mod_lines), expected)
Esempio n. 4
0
 def test_skip_search_space(self):
     expected = ({3 : 13}, 19)
     self.assertEqual(parse.cross_section(5, self.lines, 18, 4), expected)
Esempio n. 5
0
 def test_partially_overlapping_block_overlapping_part(self):
     block = ['A|-9---10---|-9---12---|',
              'E|-----10---|-----12---|']
     expected = ({0 : 10, 1 : 10}, 7)
     self.assertEqual(parse.cross_section(2, block), expected)
Esempio n. 6
0
 def test_cross_section_too_high_no_section(self):
     # automatically applies if there are no entries!
     expected = (None, None)
     self.assertEqual(parse.cross_section(12, self.lines), expected)
Esempio n. 7
0
 def test_chords_okay(self):
     expected = ({0 : 2, 5 : 2}, 3)
     h_e = 'E|-2----------------------------|---------------------------|'
     mod_lines = list(self.lines)
     mod_lines[0] = h_e
     self.assertEqual(parse.cross_section(1, mod_lines), expected)
Esempio n. 8
0
 def test_open_strings_okay(self):
     expected = ({5 : 0}, 7)
     l_e = 'E|-2---0------------------------|---------------------------|'
     mod_lines = list(self.lines)
     mod_lines[5] = l_e
     self.assertEqual(parse.cross_section(2, mod_lines), expected)
Esempio n. 9
0
 def test_cross_section_double_digits(self):
     expected = ({3 : 13}, 19)
     self.assertEqual(parse.cross_section(5, self.lines), expected)
Esempio n. 10
0
 def test_cross_section_end_okay(self):
     expected = ({4 : 4}, 45)
     self.assertEqual(parse.cross_section(11, self.lines), expected)
Esempio n. 11
0
 def test_cross_section_begin_okay(self):
     expected = ({5 : 2}, 3)
     self.assertEqual(parse.cross_section(1, self.lines), expected)