Exemplo n.º 1
0
 def test_following_notes_multi_chord(self):
     following = [{2: 0, 3: 0}, {0: 0, 1: 0}]
     expected = [(3, 0), (2, 0), (1, 0)]
     self.assertEqual(_adjacent_notes(following, 3, fwd=True), expected)
Exemplo n.º 2
0
 def test_following_notes_big_chord(self):
     # considering the lower note as first in line for symmetry
     following = [{0: 0, 1: 0, 2: 0}] 
     expected = [(2, 0), (1, 0)]
     self.assertEqual(_adjacent_notes(following, 2, fwd=True), expected)
Exemplo n.º 3
0
 def test_following_notes_empty(self):
     self.assertEqual(_adjacent_notes([], 6, fwd=True), []) 
Exemplo n.º 4
0
 def test_preceding_notes_multi_chord(self):
     preceding = [{2: 0, 3: 0}, {0: 0, 1: 0}]
     expected = [(2, 0), (1, 0), (0, 0)]
     self.assertEqual(_adjacent_notes(preceding, 3), expected)
Exemplo n.º 5
0
 def test_preceding_notes_big_chord(self):
     preceding = [{0: 0, 1: 0, 2: 0}] 
     expected = [(1, 0), (0, 0)]
     self.assertEqual(_adjacent_notes(preceding, 2), expected)
Exemplo n.º 6
0
 def test_preceding_notes_empty_sequence(self):
     preceding = []
     self.assertEqual(_adjacent_notes(preceding, 4), [])