new_params = ['buf_size', 'n_filters', 'n_coeffs', 'samplerate']
new_deflts = [1024, 40, 13, 44100]
-class Test_aubio_mfcc:
+class Test_aubio_mfcc(object):
members_args = 'name'
#print coeffs
-class Test_aubio_mfcc_all_parameters:
+class Test_aubio_mfcc_all_parameters(object):
run_values = [
(2048, 40, 13, 44100),
( 127, 'G9' ),
)
-class Test_midi2note_good_values:
+class Test_midi2note_good_values(object):
@parametrize('midi, note', list_of_known_midis)
def test_midi2note_known_values(self, midi, note):
" known values are correctly converted "
assert midi2note(midi) == (note)
-class Test_midi2note_wrong_values:
+class Test_midi2note_wrong_values(object):
def test_midi2note_negative_value(self):
" fails when passed a negative value "
( '2' ),
)
-class Test_note2midi_good_values:
+class Test_note2midi_good_values(object):
@parametrize('note, midi', list_of_known_notes)
def test_note2midi_known_values(self, note, midi):
" fails when passed a note with a note name longer than expected"
self.assertRaises(ValueError, note2midi, 'CB+-3')
-class Test_note2midi_unknown_values:
+class Test_note2midi_unknown_values(object):
@parametrize('note', list_of_unknown_notes)
def test_note2midi_unknown_values(self, note):
def create_noise(hop_s):
return np.random.rand(hop_s).astype(float_type) * 2. - 1.
-class Test_aubio_pvoc_test_case:
+class Test_aubio_pvoc_test_case(object):
""" pvoc object test case """
def test_members_automatic_sizes_default(self):
for samplerate in samplerates:
all_params.append((hop_size, samplerate, soundfile))
-class Test_aubio_sink:
+class Test_aubio_sink(object):
def test_wrong_filename(self):
with assert_raises(RuntimeError):
_debug = False
-class Test_aubio_source_test_case:
+class Test_aubio_source_test_case(object):
@parametrize('filename', list_of_sounds)
def test_close_file(self, filename):
f.close()
f.close()
-class Test_aubio_source_read:
+class Test_aubio_source_read(object):
def read_from_source(self, f):
total_frames = 0
assert_equal (duration, total_frames)
-class Test_aubio_source_wrong_params:
+class Test_aubio_source_wrong_params(object):
def test_wrong_file(self):
with assert_raises(RuntimeError):
print (result_str.format(*result_params))
return total_frames
-class Test_aubio_source_with:
+class Test_aubio_source_with(object):
@parametrize('filename', list_of_sounds)
def test_read_from_mono(self, filename):