def test_non_stepwise_motion_from(self): """ Non-stepwise motion from preceeding note. """ melody = [8, 6, 5] position = 1 self.assertFalse(is_stepwise_motion(melody, position))
def test_descending(self): """ Descending stepwise movement. """ melody = [7, 6, 5] position = 1 self.assertTrue(is_stepwise_motion(melody, position))
def test_non_uniform_motion_up_down(self): """ Stepwise motion but ascending then descending. """ melody = [5, 6, 5] position = 1 self.assertFalse(is_stepwise_motion(melody, position))
def test_non_stepwise_motion_to(self): """ Non-stepwise motion to the following note. """ melody = [5, 6, 8] position = 1 self.assertFalse(is_stepwise_motion(melody, position))
def test_ascending(self): """ Ascending stepwise movement. """ melody = [5, 6, 7] position = 1 self.assertTrue(is_stepwise_motion(melody, position))