Changeset 693de50


Ignore:
Timestamp:
Nov 9, 2018, 7:13:31 PM (5 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master
Children:
9ef3c6e
Parents:
e33d960
Message:

[tests] also test for duplicate values in set_triangle_bands

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/tests/test_filterbank_mel.py

    re33d960 r693de50  
    9595        f.set_triangle_bands(fvec(freq_list), samplerate)
    9696
     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
    97113if __name__ == '__main__':
    98114    import nose2
Note: See TracChangeset for help on using the changeset viewer.