def test_shorten_just_right(self): note = SciNote(duration=30, pitch=None, velocity=None, articulation=None) note, rest = Legato.shorten(note) self.assertEqual(27, note.duration) self.assertEqual(3, rest.duration)
def test_shorten_not_too_short(self): note = SciNote(duration=480, pitch=None, velocity=None, articulation=None) note, rest = Legato.shorten(note) self.assertEqual(470, note.duration) self.assertEqual(10, rest.duration)