Changeset 8354cb8
- Timestamp:
- Nov 10, 2018, 12:00:25 PM (6 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/timestretch, fix/ffmpeg5, master
- Children:
- 75f9fff
- Parents:
- ed09ba7c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/tests/test_filterbank_mel.py
red09ba7c r8354cb8 76 76 freq_list = [0, samplerate//4, samplerate // 2 + 1] 77 77 f = filterbank(len(freq_list)-2, 1024) 78 # TODO add assert_warns79 f.set_triangle_bands(fvec(freq_list), samplerate)78 with assert_warns(UserWarning): 79 f.set_triangle_bands(fvec(freq_list), samplerate) 80 80 81 81 def test_triangle_freqs_with_not_enough_filters(self): … … 84 84 freq_list = [0, 100, 1000, 4000, 8000, 10000] 85 85 f = filterbank(len(freq_list)-3, 1024) 86 # TODO add assert_warns87 f.set_triangle_bands(fvec(freq_list), samplerate)86 with assert_warns(UserWarning): 87 f.set_triangle_bands(fvec(freq_list), samplerate) 88 88 89 89 def test_triangle_freqs_with_too_many_filters(self): … … 92 92 freq_list = [0, 100, 1000, 4000, 8000, 10000] 93 93 f = filterbank(len(freq_list)-1, 1024) 94 # TODO add assert_warns95 f.set_triangle_bands(fvec(freq_list), samplerate)94 with assert_warns(UserWarning): 95 f.set_triangle_bands(fvec(freq_list), samplerate) 96 96 97 97 def test_triangle_freqs_with_double_value(self): … … 100 100 freq_list = [0, 100, 1000, 4000, 4000, 4000, 10000] 101 101 f = filterbank(len(freq_list)-2, 1024) 102 # TODO add assert_warns103 f.set_triangle_bands(fvec(freq_list), samplerate)102 with assert_warns(UserWarning): 103 f.set_triangle_bands(fvec(freq_list), samplerate) 104 104 105 105 def test_triangle_freqs_with_triple(self): … … 108 108 freq_list = [0, 100, 1000, 4000, 4000, 4000, 10000] 109 109 f = filterbank(len(freq_list)-2, 1024) 110 # TODO add assert_warns111 f.set_triangle_bands(fvec(freq_list), samplerate)110 with assert_warns(UserWarning): 111 f.set_triangle_bands(fvec(freq_list), samplerate) 112 112 113 113
Note: See TracChangeset
for help on using the changeset viewer.