Changeset fcef3fd


Ignore:
Timestamp:
May 3, 2016, 5:39:02 PM (4 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, master, pitchshift, sampler, timestretch, yinfft+
Children:
23982aa
Parents:
de0a492
Message:

python/tests/test_fft.py: more tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/tests/test_fft.py

    rde0a492 rfcef3fd  
    165165            f.rdo(s)
    166166
     167class aubio_fft_wrong_params(TestCase):
     168
     169    def test_wrong_buf_size(self):
     170        win_s = -1
     171        with self.assertRaises(ValueError):
     172            fft(win_s)
     173
     174    def test_buf_size_not_power_of_two(self):
     175        # when compiled with fftw3, aubio supports non power of two fft sizes
     176        win_s = 320
     177        try:
     178            with self.assertRaises(RuntimeError):
     179                fft(win_s)
     180        except AssertionError as e:
     181            self.skipTest('creating aubio.fft with size %d did not fail' % win_s)
     182
     183    def test_buf_size_too_small(self):
     184        win_s = 1
     185        with self.assertRaises(RuntimeError):
     186            fft(win_s)
     187
    167188if __name__ == '__main__':
    168189    from nose2 import main
Note: See TracChangeset for help on using the changeset viewer.