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)
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)
def test_following_notes_empty(self): self.assertEqual(_adjacent_notes([], 6, fwd=True), [])
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)
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)
def test_preceding_notes_empty_sequence(self): preceding = [] self.assertEqual(_adjacent_notes(preceding, 4), [])