[tests] [py27] make sure all classes are old-school 'new-style'
authorPaul Brossier <piem@piem.org>
Fri, 2 Nov 2018 21:09:36 +0000 (22:09 +0100)
committerPaul Brossier <piem@piem.org>
Fri, 2 Nov 2018 21:09:36 +0000 (22:09 +0100)
python/tests/test_mfcc.py
python/tests/test_midi2note.py
python/tests/test_note2midi.py
python/tests/test_phasevoc.py
python/tests/test_sink.py
python/tests/test_source.py

index f62083a..f25fb9d 100755 (executable)
@@ -14,7 +14,7 @@ samplerate = 44100
 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'
 
@@ -74,7 +74,7 @@ class aubio_mfcc_compute(TestCase):
         #print coeffs
 
 
-class Test_aubio_mfcc_all_parameters:
+class Test_aubio_mfcc_all_parameters(object):
 
     run_values = [
             (2048, 40, 13, 44100),
index f71a9e1..63ceda8 100755 (executable)
@@ -14,14 +14,14 @@ list_of_known_midis = (
         ( 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 "
index ffc087c..cfa1db6 100755 (executable)
@@ -44,7 +44,7 @@ list_of_unknown_notes = (
         ( '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):
@@ -107,7 +107,7 @@ class note2midi_wrong_values(TestCase):
         " 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):
index a38c3c8..e17d1fd 100755 (executable)
@@ -17,7 +17,7 @@ def create_sine(hop_s, freq, samplerate):
 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):
index 2e0a04b..51f60ea 100755 (executable)
@@ -19,7 +19,7 @@ for soundfile in list_of_sounds:
         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):
index cca8132..0ab87ae 100755 (executable)
@@ -23,7 +23,7 @@ no_sounds_msg = "no test sounds, add some in 'python/tests/sounds/'!"
 
 _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):
@@ -40,7 +40,7 @@ class Test_aubio_source_test_case:
         f.close()
         f.close()
 
-class Test_aubio_source_read:
+class Test_aubio_source_read(object):
 
     def read_from_source(self, f):
         total_frames = 0
@@ -118,7 +118,7 @@ class Test_aubio_source_read:
         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):
@@ -171,7 +171,7 @@ class Test_aubio_source_readmulti(Test_aubio_source_read):
             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):