def test_create_rest(): note = Note.rest(1) assert note.pitch == Note.Pitch.R assert note.duration == 1 assert note.is_rest() assert note.accidental == Note.Accidental.NATURAL assert note.octave == OCTAVE_MIN
def test_change_rest_to_pitch(): note = Note.rest(1) assert note.is_rest() print(note) print(note.octave) note.pitch = Note.Pitch.C print(note) assert note.pitch == Note.Pitch.C assert note.accidental == Note.Accidental.NATURAL assert note.octave == OCTAVE_MIN