Showing the changes to python (1 of 1 file). Show all
Unified · Split
| @@ -94,6 +94,22 @@ class aubio_filterbank_mel_test_case(TestCase): · 93 unmodified lines | ||
| 94 | 94 | # TODO add assert_warns |
| 95 | 95 | f.set_triangle_bands(fvec(freq_list), samplerate) |
| 96 | 96 | |
| 97 | + def test_triangle_freqs_with_double_value(self): | |
| 98 | + """make sure set_triangle_bands works with 2 duplicate freqs""" | |
| 99 | + samplerate = 22050 | |
| 100 | + freq_list = [0, 100, 1000, 4000, 4000, 4000, 10000] | |
| 101 | + f = filterbank(len(freq_list)-2, 1024) | |
| 102 | + # TODO add assert_warns | |
| 103 | + f.set_triangle_bands(fvec(freq_list), samplerate) | |
| 104 | + | |
| 105 | + def test_triangle_freqs_with_triple(self): | |
| 106 | + """make sure set_triangle_bands works with 3 duplicate freqs""" | |
| 107 | + samplerate = 22050 | |
| 108 | + freq_list = [0, 100, 1000, 4000, 4000, 4000, 10000] | |
| 109 | + f = filterbank(len(freq_list)-2, 1024) | |
| 110 | + # TODO add assert_warns | |
| 111 | + f.set_triangle_bands(fvec(freq_list), samplerate) | |
| 112 | + | |
| 97 | 113 | if __name__ == '__main__': |
| 98 | 114 | import nose2 |
| 99 | 115 | nose2.main() |