#NEWLINE# def test_midi_to_note( ) : #NEWLINE# #INDENT# def __test( midi_num , note , octave , cents ) : #NEWLINE# #INDENT# note_out = librosa . midi_to_note ( midi_num , octave = octave , cents = cents ) #NEWLINE# eq_ ( note_out , note ) #NEWLINE# #UNINDENT# midi_num = 24.25 #NEWLINE# ( yield ( __test , __test , 'C' , False , False ) ) #NEWLINE# ( yield ( __test , midi_num , 'C1' , True , False ) ) #NEWLINE# ( yield ( raises ( librosa . ParameterError ) ( __test ) , midi_num , 'C+25' , False , True ) ) #NEWLINE# ( yield ( __test , midi_num , 'C1+25' , True , True ) ) #NEWLINE# ( yield ( __test , [ midi_num ] , [ 'C' ] , False , False ) )