History

[tests] [py27] make sure all classes are old-school 'new-style'

Paul Brossier committed 8 years ago

Commit 8607a741 parent 67024ff6 files · +12 −12Browse files

Showing the changes to python (6 of 6 files). Show all

Unified · Split

6 files
  1. python/tests/test_mfcc.py +2 −2
  2. python/tests/test_midi2note.py +2 −2
  3. python/tests/test_note2midi.py +2 −2
  4. python/tests/test_phasevoc.py +1 −1
  5. python/tests/test_sink.py +1 −1
  6. python/tests/test_source.py +4 −4
python/tests/test_mfcc.py+2−2
@@ -14,7 +14,7 @@ samplerate = 44100 · 13 unmodified lines
1414 new_params = ['buf_size', 'n_filters', 'n_coeffs', 'samplerate']
1515 new_deflts = [1024, 40, 13, 44100]
1616
17−class Test_aubio_mfcc:
17+class Test_aubio_mfcc(object):
1818
1919 members_args = 'name'
2020
@@ -74,7 +74,7 @@ class aubio_mfcc_compute(TestCase): · 53 unmodified lines
7474 #print coeffs
7575
7676
77−class Test_aubio_mfcc_all_parameters:
77+class Test_aubio_mfcc_all_parameters(object):
7878
7979 run_values = [
8080 (2048, 40, 13, 44100),
python/tests/test_midi2note.py+2−2
@@ -14,14 +14,14 @@ list_of_known_midis = ( · 13 unmodified lines
1414 ( 127, 'G9' ),
1515 )
1616
17−class Test_midi2note_good_values:
17+class Test_midi2note_good_values(object):
1818
1919 @parametrize('midi, note', list_of_known_midis)
2020 def test_midi2note_known_values(self, midi, note):
2121 " known values are correctly converted "
2222 assert midi2note(midi) == (note)
2323
24−class Test_midi2note_wrong_values:
24+class Test_midi2note_wrong_values(object):
2525
2626 def test_midi2note_negative_value(self):
2727 " fails when passed a negative value "
python/tests/test_note2midi.py+2−2
@@ -44,7 +44,7 @@ list_of_unknown_notes = ( · 43 unmodified lines
4444 ( '2' ),
4545 )
4646
47−class Test_note2midi_good_values:
47+class Test_note2midi_good_values(object):
4848
4949 @parametrize('note, midi', list_of_known_notes)
5050 def test_note2midi_known_values(self, note, midi):
@@ -107,7 +107,7 @@ class note2midi_wrong_values(TestCase): · 56 unmodified lines
107107 " fails when passed a note with a note name longer than expected"
108108 self.assertRaises(ValueError, note2midi, 'CB+-3')
109109
110−class Test_note2midi_unknown_values:
110+class Test_note2midi_unknown_values(object):
111111
112112 @parametrize('note', list_of_unknown_notes)
113113 def test_note2midi_unknown_values(self, note):
python/tests/test_phasevoc.py+1−1
@@ -17,7 +17,7 @@ def create_sine(hop_s, freq, samplerate): · 16 unmodified lines
1717 def create_noise(hop_s):
1818 return np.random.rand(hop_s).astype(float_type) * 2. - 1.
1919
20−class Test_aubio_pvoc_test_case:
20+class Test_aubio_pvoc_test_case(object):
2121 """ pvoc object test case """
2222
2323 def test_members_automatic_sizes_default(self):
python/tests/test_sink.py+1−1
@@ -19,7 +19,7 @@ for soundfile in list_of_sounds: · 18 unmodified lines
1919 for samplerate in samplerates:
2020 all_params.append((hop_size, samplerate, soundfile))
2121
22−class Test_aubio_sink:
22+class Test_aubio_sink(object):
2323
2424 def test_wrong_filename(self):
2525 with assert_raises(RuntimeError):
python/tests/test_source.py+4−4
@@ -23,7 +23,7 @@ no_sounds_msg = "no test sounds, add some in 'python/tests/sounds/'!" · 22 unmodified lines
2323
2424 _debug = False
2525
26−class Test_aubio_source_test_case:
26+class Test_aubio_source_test_case(object):
2727
2828 @parametrize('filename', list_of_sounds)
2929 def test_close_file(self, filename):
@@ -40,7 +40,7 @@ class Test_aubio_source_test_case: · 10 unmodified lines
4040 f.close()
4141 f.close()
4242
43−class Test_aubio_source_read:
43+class Test_aubio_source_read(object):
4444
4545 def read_from_source(self, f):
4646 total_frames = 0
@@ -118,7 +118,7 @@ class Test_aubio_source_read: · 71 unmodified lines
118118 assert_equal (duration, total_frames)
119119
120120
121−class Test_aubio_source_wrong_params:
121+class Test_aubio_source_wrong_params(object):
122122
123123 def test_wrong_file(self):
124124 with assert_raises(RuntimeError):
@@ -171,7 +171,7 @@ class Test_aubio_source_readmulti(Test_aubio_source_read): · 46 unmodified lines
171171 print (result_str.format(*result_params))
172172 return total_frames
173173
174−class Test_aubio_source_with:
174+class Test_aubio_source_with(object):
175175
176176 @parametrize('filename', list_of_sounds)
177177 def test_read_from_mono(self, filename):

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t